Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/deploy tolerations #58

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/increment-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Increment Version

on: [pull_request, pull_request_target]

jobs:
build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: check source code
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.ACCESS_TOKEN }}


- name: next release version
id: nextversion
uses: jenkins-x-plugins/jx-release-version@v2.6.11
with:
previous-version: from-file:charts/tekton-pipeline/Chart.yaml

- name: Update version in Chart.yaml
id: updatechart
uses: mikefarah/yq@v4.34.1
with:
cmd: yq eval '.version = "${{ steps.nextversion.outputs.version }}"' -i charts/tekton-pipeline/Chart.yaml

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: update Chart.yaml'
19 changes: 0 additions & 19 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,6 @@ jobs:
steps:
- name: check source code
uses: actions/checkout@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}

- name: next release version
id: nextversion
uses: jenkins-x-plugins/jx-release-version@v2.6.11
with:
previous-version: from-file:charts/tekton-pipeline/Chart.yaml

- name: Update version in Chart.yaml
id: updatechart
uses: mikefarah/yq@v4.34.1
with:
cmd: yq eval '.version = "${{ steps.nextversion.outputs.version }}"' -i charts/tekton-pipeline/Chart.yaml

- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'chore: update Chart.yaml'

- uses: J12934/helm-gh-pages-action@master
with:
Expand Down
2 changes: 1 addition & 1 deletion charts/tekton-pipeline/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: A Helm chart for Tekton Pipelines
name: tekton-pipeline
version: 0.6.4
version: 1.0.0
appVersion: 0.42.0
icon: https://avatars2.githubusercontent.com/u/47602533
home: https://github.com/cdfoundation/tekton-helm-chart
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end}}
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- helmTemplateRemoveMe: |
{{- with .Values.controllerDeploymentTolerations.nodeSelectorTerms }}
{{- toYaml . | nindent 12 }}
{{- end}}
- matchExpressions:
- key: kubernetes.io/os
operator: NotIn
values:
- windows
containers:
- name: tekton-pipelines-controller
envFrom:
Expand All @@ -30,3 +43,13 @@ spec:
optional: true
helmTemplateRemoveMe: |
image: {{ .Values.controller.deployment.image }}
nodeSelector:
helmTemplateRemoveMe: |
{{- with .Values.controllerDeploymentTolerations.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end}}
tolerations:
- helmTemplateRemoveMe: |
{{- with .Values.controllerDeploymentTolerations.tolerations }}
{{- toYaml . | nindent 6 }}
{{- end}}
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ spec:
- secretRef:
name: "{{ .Values.webhook.envFromSecret }}"
optional: true
nodeSelector:
helmTemplateRemoveMe: |
{{- with .Values.webhookDeploymentTolerations.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end}}
tolerations:
- helmTemplateRemoveMe: |
{{- with .Values.webhookDeploymentTolerations.tolerations }}
{{- toYaml . | nindent 6 }}
{{- end}}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
{{- with .Values.controllerDeploymentTolerations.nodeSelectorTerms }}
{{- toYaml . | nindent 12 }}
{{- end}}
- matchExpressions:
- key: kubernetes.io/os
operator: NotIn
Expand Down Expand Up @@ -147,7 +150,15 @@ spec:
name: verification-secrets
readOnly: true
image: {{ .Values.controller.deployment.image }}
nodeSelector:
{{- with .Values.controllerDeploymentTolerations.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end}}
serviceAccountName: tekton-pipelines-controller
tolerations:
{{- with .Values.controllerDeploymentTolerations.tolerations }}
{{- toYaml . | nindent 6 }}
{{- end}}
volumes:
- configMap:
name: config-logging
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,16 @@ spec:
app.kubernetes.io/part-of: tekton-pipelines
topologyKey: kubernetes.io/hostname
weight: 100
{{- with .Values.resolverDeploymentTolerations.nodeAffinity }}
nodeAffinity: {{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- with .Values.resolverDeploymentTolerations.nodeSelector }}
nodeSelector: {{- toYaml . | trim | nindent 10 }}
{{- end }}
serviceAccountName: tekton-pipelines-resolvers
{{- with .Values.resolverDeploymentTolerations.tolerations }}
tolerations: {{- toYaml . | trim | nindent 6 }}
{{- end }}
containers:
- name: controller
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/resolvers:v0.42.0@sha256:eaa7d21d45f0bc1c411823d6a943e668c820f9cf52f1549d188edb89e992f6e0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,12 @@ spec:
runAsUser: 65532
seccompProfile:
type: RuntimeDefault
nodeSelector:
{{- with .Values.webhookDeploymentTolerations.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end}}
serviceAccountName: tekton-pipelines-webhook
tolerations:
{{- with .Values.webhookDeploymentTolerations.tolerations }}
{{- toYaml . | nindent 6 }}
{{- end}}
15 changes: 15 additions & 0 deletions charts/tekton-pipeline/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,21 @@ remoteResolversPod:
requests:
cpu: 100m
memory: 100Mi
# Add node affinity tolerations for tekton-remote-resolvers
resolverDeploymentTolerations:
nodeAffinity: []
nodeSelector: []
tolerations: []
# Add node affinity tolerations for tekton-pipeline-controller
controllerDeploymentTolerations:
nodeSelectorTerms: []
nodeSelector: []
tolerations: []
# Add node affinity tolerations for tekton-pipelines-webhook
webhookDeploymentTolerations:
nodeSelectorTerms: []
nodeSelector: []
tolerations: []
gitResolverConfig:
# The maximum amount of time a single anonymous cloning resolution may take.
fetch-timeout: "1m"
Expand Down
9 changes: 9 additions & 0 deletions src/templates/tekton-pipelines-remote-resolvers-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,16 @@ spec:
app.kubernetes.io/part-of: tekton-pipelines
topologyKey: kubernetes.io/hostname
weight: 100
{{- with .Values.resolverDeploymentTolerations.nodeAffinity }}
nodeAffinity: {{- toYaml . | trim | nindent 10 }}
{{- end }}
{{- with .Values.resolverDeploymentTolerations.nodeSelector }}
nodeSelector: {{- toYaml . | trim | nindent 10 }}
{{- end }}
serviceAccountName: tekton-pipelines-resolvers
{{- with .Values.resolverDeploymentTolerations.tolerations }}
tolerations: {{- toYaml . | trim | nindent 6 }}
{{- end }}
containers:
- name: controller
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/resolvers:v0.42.0@sha256:eaa7d21d45f0bc1c411823d6a943e668c820f9cf52f1549d188edb89e992f6e0
Expand Down
Loading