nemonik/sameersbn-gitlab-helm

affinity - error converting YAML to JSON: yaml: line 28: did not find expected key

insekticid opened this issue · 1 comments

values.yaml

Error: UPGRADE FAILED: YAML parse error on gitlab/templates/gitlab-redis-statefulset.yaml: error converting YAML to JSON: yaml: line 28: did not find expected key

gitlab:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: kubernetes.io/hostname
            operator: In
            values:
            - rke2-agent-1

Could you please provide working example?

Like so

imagePullSecrets:
  - name: regcred

postgresql:
  image:
    repository: "sameersbn/postgresql"
    tag: "12-20200524"

  persistence:
    storageClassName: "longhorn"
    size: '20Gi'
    enabled: true

  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: 'k3s.io/hostname'
            operator: In
            values:
            - 'k3s-agent-1.example.com'
 
redis:
  image:
    repository: "docker-registry.toolchain.c2il.org/redis"
    tag: "5.0.9"

  persistence:
    storageClassName: "longhorn"
    size: '5Gi'
    enabled: true

  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: 'k3s.io/hostname'
            operator: In
            values:
            - 'k3s-agent-1.example.com'

gitlab:
  image:
    repository: "sameersbn/gitlab"
    tag: "14.2.2"

  persistence:
    data:
      storageClassName: "longhorn"
      size: '80Gi'
      enabled: true

    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: 'k3s.io/hostname'
            operator: In
            values:
            - 'k3s-agent-1.example.com'
 
  service:
    type: ClusterIP
    http:
      port: 80
    ssh:
      port: 2022

I believe I fixed an issue in the affinity portion a few weeks back... Sorry for that.