diff --git a/Makefile b/Makefile index 50070e2..7f16066 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,10 @@ endif # Move content of data: from git-resolver-config-cm.yaml to gitResolverConfig: in values.yaml yq -i '.gitResolverConfig = load("$(CHART_DIR)/templates/git-resolver-config-cm.yaml").data' $(CHART_DIR)/values.yaml yq -i '.data = null' $(CHART_DIR)/templates/git-resolver-config-cm.yaml + # Move content of : from tekton-pipelines-controller-deploy.yaml to controller.affinities.nodeAffinities in values.yaml + yq -i '.controller.affinity.nodeAffinity = load("$(CHART_DIR)/templates/tekton-pipelines-controller-deploy.yaml").spec.template.spec.affinity.nodeAffinity' $(CHART_DIR)/values.yaml + # Move content of : from tekton-pipelines-webhook-deploy.yaml to webhook.affinities.nodeAffinities in values.yaml + yq -i '.webhook.affinity.nodeAffinity = load("$(CHART_DIR)/templates/tekton-pipelines-webhook-deploy.yaml").spec.template.spec.affinity.nodeAffinity' $(CHART_DIR)/values.yaml # Retrieve the image value from the template yq -i '.controller.deployment.image = load("$(CHART_DIR)/templates/tekton-pipelines-controller-deploy.yaml").spec.template.spec.containers[].image' $(CHART_DIR)/values.yaml # Remove the image value, so that end users can customize the image diff --git a/charts/tekton-pipeline/Chart.yaml b/charts/tekton-pipeline/Chart.yaml index 9907296..3e3547e 100644 --- a/charts/tekton-pipeline/Chart.yaml +++ b/charts/tekton-pipeline/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: A Helm chart for Tekton Pipelines name: tekton-pipeline -version: 1.0.1 +version: 1.0.2 appVersion: 0.42.0 icon: https://avatars2.githubusercontent.com/u/47602533 home: https://github.com/cdfoundation/tekton-helm-chart diff --git a/charts/tekton-pipeline/patches/tekton-pipelines-controller-deploy.yaml b/charts/tekton-pipeline/patches/tekton-pipelines-controller-deploy.yaml index bbe958f..8f88360 100644 --- a/charts/tekton-pipeline/patches/tekton-pipelines-controller-deploy.yaml +++ b/charts/tekton-pipeline/patches/tekton-pipelines-controller-deploy.yaml @@ -23,11 +23,10 @@ spec: {{- end}} spec: affinity: - nodeAffinity: - helmTemplateRemoveMe: | - {{- with .Values.controllerDeploymentTolerations.nodeAffinity }} - {{- toYaml . | nindent 10 }} - {{- end }} + helmTemplateRemoveMe: | + {{- with .Values.controller.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: tekton-pipelines-controller envFrom: @@ -38,11 +37,11 @@ spec: image: {{ .Values.controller.deployment.image }} nodeSelector: helmTemplateRemoveMe: | - {{- with .Values.controllerDeploymentTolerations.nodeSelector }} + {{- with .Values.controller.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end}} tolerations: - helmTemplateRemoveMe: | - {{- with .Values.controllerDeploymentTolerations.tolerations }} + {{- with .Values.controller.tolerations }} {{- toYaml . | nindent 6 }} {{- end}} diff --git a/charts/tekton-pipeline/patches/tekton-pipelines-webhook-deploy.yaml b/charts/tekton-pipeline/patches/tekton-pipelines-webhook-deploy.yaml index fd25e47..1c76fd0 100644 --- a/charts/tekton-pipeline/patches/tekton-pipelines-webhook-deploy.yaml +++ b/charts/tekton-pipeline/patches/tekton-pipelines-webhook-deploy.yaml @@ -17,11 +17,10 @@ spec: {{- end}} spec: affinity: - nodeAffinity: - helmTemplateRemoveMe: | - {{- with .Values.webhookDeploymentTolerations.nodeAffinity }} - {{- toYaml . | nindent 10 }} - {{- end }} + helmTemplateRemoveMe: | + {{- with .Values.webhook.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} containers: - name: webhook envFrom: @@ -30,11 +29,11 @@ spec: optional: true nodeSelector: helmTemplateRemoveMe: | - {{- with .Values.webhookDeploymentTolerations.nodeSelector }} + {{- with .Values.webhook.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end}} tolerations: - helmTemplateRemoveMe: | - {{- with .Values.webhookDeploymentTolerations.tolerations }} + {{- with .Values.webhook.tolerations }} {{- toYaml . | nindent 6 }} {{- end}} diff --git a/charts/tekton-pipeline/templates/tekton-pipelines-controller-deploy.yaml b/charts/tekton-pipeline/templates/tekton-pipelines-controller-deploy.yaml index 56ef5a5..a1c7090 100644 --- a/charts/tekton-pipeline/templates/tekton-pipelines-controller-deploy.yaml +++ b/charts/tekton-pipeline/templates/tekton-pipelines-controller-deploy.yaml @@ -42,10 +42,9 @@ spec: version: v0.42.0 spec: affinity: - nodeAffinity: - {{- with .Values.controllerDeploymentTolerations.nodeAffinity }} - {{- toYaml . | nindent 10 }} - {{- end }} + {{- with .Values.controller.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} containers: - args: - -kubeconfig-writer-image @@ -144,12 +143,12 @@ spec: readOnly: true image: {{ .Values.controller.deployment.image }} nodeSelector: - {{- with .Values.controllerDeploymentTolerations.nodeSelector }} + {{- with .Values.controller.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end}} serviceAccountName: tekton-pipelines-controller tolerations: - {{- with .Values.controllerDeploymentTolerations.tolerations }} + {{- with .Values.controller.tolerations }} {{- toYaml . | nindent 6 }} {{- end}} volumes: diff --git a/charts/tekton-pipeline/templates/tekton-pipelines-webhook-deploy.yaml b/charts/tekton-pipeline/templates/tekton-pipelines-webhook-deploy.yaml index b5bb2a1..ee62ef5 100644 --- a/charts/tekton-pipeline/templates/tekton-pipelines-webhook-deploy.yaml +++ b/charts/tekton-pipeline/templates/tekton-pipelines-webhook-deploy.yaml @@ -36,10 +36,9 @@ spec: version: v0.42.0 spec: affinity: - nodeAffinity: - {{- with .Values.webhookDeploymentTolerations.nodeAffinity }} - {{- toYaml . | nindent 10 }} - {{- end }} + {{- with .Values.webhook.affinity }} + {{- toYaml . | nindent 8 }} + {{- end }} podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - podAffinityTerm: @@ -122,11 +121,11 @@ spec: seccompProfile: type: RuntimeDefault nodeSelector: - {{- with .Values.webhookDeploymentTolerations.nodeSelector }} + {{- with .Values.webhook.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end}} serviceAccountName: tekton-pipelines-webhook tolerations: - {{- with .Values.webhookDeploymentTolerations.tolerations }} + {{- with .Values.webhook.tolerations }} {{- toYaml . | nindent 6 }} {{- end}} diff --git a/charts/tekton-pipeline/values.yaml b/charts/tekton-pipeline/values.yaml index 7ed1c59..bb5aaeb 100644 --- a/charts/tekton-pipeline/values.yaml +++ b/charts/tekton-pipeline/values.yaml @@ -17,15 +17,59 @@ controller: pod: labels: {} annotations: {} - # specifies the name of an optional kubernetes secret to mount environment variables from for things like HTTP proxy + # specifies the name of an optional kubernetes secret to mount environment variables from for things like HTTP proxy envFromSecret: "tekton-env" + # Add node affinity tolerations for tekton-pipeline-controller. Add additional matchExpressions below. Default is set. + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/os + operator: NotIn + values: + - windows + tolerations: [] + nodeSelector: [] webhook: deployment: labels: {} pod: labels: {} - # specifies the name of an optional kubernetes secret to mount environment variables from for things like HTTP proxy + # specifies the name of an optional kubernetes secret to mount environment variables from for things like HTTP proxy envFromSecret: "tekton-env" + # Add node affinity tolerations for tekton-pipelines-webhook. Add additional matchExpressions below. Default is set. + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/os + operator: NotIn + values: + - windows + tolerations: [] + nodeSelector: [] +# Settings to increase deployment resources for tekton-pipelines-remote-resolvers-deployment +remoteResolversPod: + resources: + limits: + cpu: 1000m + memory: 1000Mi + requests: + cpu: 100m + memory: 100Mi +resolverDeploymentTolerations: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: "agentpool" + operator: "In" + values: + - "buildnode" + tolerations: [] + nodeSelector: [] # configuration to put in the config-defaults ConfigMap configDefaults: _example: | @@ -85,52 +129,6 @@ configDefaults: # default-max-matrix-combinations-count contains the default maximum number # of combinations from a Matrix, if none is specified. default-max-matrix-combinations-count: "256" -# Settings to increase deployment resources for tekton-pipelines-remote-resolvers-deployment -remoteResolversPod: - resources: - limits: - cpu: 1000m - memory: 1000Mi - requests: - cpu: 100m - memory: 100Mi -# Add node affinity tolerations for tekton-remote-resolvers -resolverDeploymentTolerations: - nodeAffinity: {} - # nodeAffinity: - # requiredDuringSchedulingIgnoredDuringExecution: - # nodeSelectorTerms: - # - matchExpressions: - # - key: "key" - # operator: "In" - # values: - # - "node" - nodeSelector: [] - tolerations: [] -# Add node affinity tolerations for tekton-pipeline-controller. Add additional matchExpressions below. Default is set. -controllerDeploymentTolerations: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/os - operator: NotIn - values: - - windows - nodeSelector: [] - tolerations: [] -# Add node affinity tolerations for tekton-pipelines-webhook. Add additional matchExpressions below. Default is set. -webhookDeploymentTolerations: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/os - operator: NotIn - values: - - windows - nodeSelector: [] - tolerations: [] gitResolverConfig: # The maximum amount of time a single anonymous cloning resolution may take. fetch-timeout: "1m"