Skip to content

Use parseAppVersion for kas image tag

What does this MR do?

Use parseAppVersion for kas image tag

For master branches, kas uses latest image tag.

We keep the image.tag in charts/gitlab/charts/kas/values.yaml for now, as release tooling is not updated yet to update the appVersion on each chart release.

Related issues

https://gitlab.com/gitlab-org/release-tools/-/issues/489

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Templating

Before:

$ helm template -g -s charts/gitlab/charts/kas/templates/deployment.yaml . --set certmanager-issuer.email=t@example.com --set global.kas.enabled=true
---
# Source: gitlab/charts/gitlab/charts/kas/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: RELEASE-NAME-kas
  namespace: default
  labels:
    app: kas
    chart: kas-4.6.1
    release: RELEASE-NAME
    heritage: Helm
  annotations:
    
spec:
  selector:
    matchLabels:
      app: kas
      release: RELEASE-NAME
  template:
    metadata:
      labels:
        app: kas
        release: RELEASE-NAME
        
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
    spec:
      containers:
        
        - name: kas
          image: "registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/kas:v13.6.1"
          
          args:
            - "--configuration-file=/etc/kas/config.yaml"
          ports:
            - containerPort: 8150
              name: kas
            - containerPort: 8151
              name: kas-metrics
          readinessProbe:
            tcpSocket:
              port: 8150
            initialDelaySeconds: 5
            periodSeconds: 10
          livenessProbe:
            tcpSocket:
              port: 8150
            initialDelaySeconds: 15
            periodSeconds: 20
          resources:
            requests:
              cpu: 100m
              memory: 100M
          volumeMounts:
            - name: init-etc-kas
              mountPath: /etc/kas
              readOnly: true
            
      volumes:
      
      - name: init-etc-kas
        projected:
          defaultMode: 0440
          sources:
            - configMap:
                name: RELEASE-NAME-kas
            - secret:
                name: "RELEASE-NAME-gitlab-kas-secret"
                items:
                  - key: "kas_shared_secret"
                    path: .gitlab_kas_secret

After:

$ helm template -g -s charts/gitlab/charts/kas/templates/deployment.yaml . --set certmanager-issuer.email=t@example.com --set global.kas.enabled=true
---
# Source: gitlab/charts/gitlab/charts/kas/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: RELEASE-NAME-kas
  namespace: default
  labels:
    app: kas
    chart: kas-4.6.1
    release: RELEASE-NAME
    heritage: Helm
  annotations:
    
spec:
  selector:
    matchLabels:
      app: kas
      release: RELEASE-NAME
  template:
    metadata:
      labels:
        app: kas
        release: RELEASE-NAME
        
      annotations:
        cluster-autoscaler.kubernetes.io/safe-to-evict: "true"
    spec:
      containers:
        
        - name: kas
          image: "registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/kas:v13.6.1"
          
          args:
            - "--configuration-file=/etc/kas/config.yaml"
          ports:
            - containerPort: 8150
              name: kas
            - containerPort: 8151
              name: kas-metrics
          readinessProbe:
            tcpSocket:
              port: 8150
            initialDelaySeconds: 5
            periodSeconds: 10
          livenessProbe:
            tcpSocket:
              port: 8150
            initialDelaySeconds: 15
            periodSeconds: 20
          resources:
            requests:
              cpu: 100m
              memory: 100M
          volumeMounts:
            - name: init-etc-kas
              mountPath: /etc/kas
              readOnly: true
            
      volumes:
      
      - name: init-etc-kas
        projected:
          defaultMode: 0440
          sources:
            - configMap:
                name: RELEASE-NAME-kas
            - secret:
                name: "RELEASE-NAME-gitlab-kas-secret"
                items:
                  - key: "kas_shared_secret"
                    path: .gitlab_kas_secret

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • [-] Documentation created/updated
  • Tests added
  • [-] Integration tests added to GitLab QA
  • [-] Equivalent MR/issue for omnibus-gitlab opened
Edited by Thong Kuah

Merge request reports

Loading