Skip to content

Commit 7a0c0a5

Browse files
authored
Merge pull request #120 from zakkg3/fix_chart
[chart 0.4.1] add node selectors tolerations and affinities
2 parents 2407a34 + 0fc133a commit 7a0c0a5

File tree

8 files changed

+82
-34
lines changed

8 files changed

+82
-34
lines changed

.github/linters/.gitleaks.toml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[allowlist]
2+
description = "global allow list"
3+
paths = [
4+
'''*/yaml/Object_example/*.yaml''',
5+
'''*/conformance/tests.py'''
6+
]

.github/workflows/e2e-testing.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ name: E2E Testing
33
on: [push, pull_request]
44

55
jobs:
6-
lint-test:
6+
e2e-tests:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
1010
kind-node-images:
11+
- kindest/node:v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245
12+
- kindest/node:v1.28.7@sha256:9bc6c451a289cf96ad0bbaf33d416901de6fd632415b076ab05f5fa7e4f65c58
1113
- kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
1214
- kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
1315
- kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
14-
- kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab
1516

1617
steps:
1718
- name: Checkout
@@ -57,7 +58,7 @@ jobs:
5758
run: kind load docker-image cluster-secret:${{ github.sha }} --name=chart-testing
5859

5960
- name: Run helm install
60-
run: helm install cluster-secret ./charts/cluster-secret -n cluster-secret --create-namespace --set clustersecret.clustersecret.image.repository=cluster-secret,clustersecret.clustersecret.image.tag=${{ github.sha }}
61+
run: helm install cluster-secret ./charts/cluster-secret -n cluster-secret --create-namespace --set image.repository=cluster-secret,image.tag=${{ github.sha }}
6162

6263
- run: pip3 install -r conformance/requirements.txt
6364
name: Install python requirements

.github/workflows/review-linter.yml

-17
This file was deleted.

.github/workflows/super-linter.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Lint
3+
4+
on: # yamllint disable-line rule:truthy
5+
push: null
6+
pull_request: null
7+
8+
jobs:
9+
build:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: read
15+
packages: read
16+
# To report GitHub Actions status checks
17+
statuses: write
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
# super-linter needs the full git history to get the
24+
# list of files that changed across commits
25+
fetch-depth: 0
26+
27+
- name: Super-linter
28+
uses: super-linter/[email protected] # x-release-please-version
29+
env:
30+
# To report GitHub Actions status checks
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
VALIDATE_PYTHON: true
33+
LINTER_RULES_PATH: `.github/workflows/linters`
34+
35+
36+

charts/cluster-secret/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: cluster-secret
33
description: ClusterSecret Operator
44
kubeVersion: '>= 1.16.0-0'
55
type: application
6-
version: 0.4.0
6+
version: 0.4.1
77
icon: https://clustersecret.io/assets/csninjasmall.png
88
sources:
99
- https://github.com/zakkg3/ClusterSecret

charts/cluster-secret/templates/deployment.yaml

+18-3
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,19 @@ spec:
2525
spec:
2626
securityContext:
2727
runAsUser: 100 # 100 is set by the container and can NOT be changed here - this would result in a getpwuid() error
28+
{{- with .Values.imagePullSecrets }}
29+
imagePullSecrets:
30+
{{- toYaml . | nindent 8 }}
31+
{{- end }}
2832
containers:
2933
- env:
3034
- name: KUBERNETES_CLUSTER_DOMAIN
3135
value: {{ .Values.kubernetesClusterDomain }}
3236
- name: CLUSTER_SECRET_VERSION
3337
value: {{ .Chart.AppVersion | quote }}
3438
- name: REPLACE_EXISTING
35-
value: {{ .Values.clustersecret.clustersecret.replace_existing | default "false" | quote }}
36-
image: {{ .Values.clustersecret.clustersecret.image.repository }}:{{ .Values.clustersecret.clustersecret.image.tag
37-
| default .Chart.AppVersion }}
39+
value: {{ .Values.replace_existing | default "false" | quote }}
40+
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
3841
name: clustersecret
3942
securityContext:
4043
runAsUser: 100 # 100 is set by the container and can NOT be changed here - this would result in a getpwuid() error
@@ -45,3 +48,15 @@ spec:
4548
periodSeconds: 120
4649
resources: {}
4750
serviceAccountName: {{ include "cluster-secret.fullname" . }}-account
51+
{{- with .Values.nodeSelector }}
52+
nodeSelector:
53+
{{- toYaml . | nindent 8 }}
54+
{{- end }}
55+
{{- with .Values.affinity }}
56+
affinity:
57+
{{- toYaml . | nindent 8 }}
58+
{{- end }}
59+
{{- with .Values.tolerations }}
60+
tolerations:
61+
{{- toYaml . | nindent 8 }}
62+
{{- end }}

charts/cluster-secret/templates/role-cluster-rbac.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rules:
2222
- list
2323
- get
2424
- patch
25+
- watch
2526
- apiGroups:
2627
- events.k8s.io
2728
resources:

charts/cluster-secret/values.yaml

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
clustersecret:
2-
clustersecret:
3-
image:
4-
repository: quay.io/clustersecret/clustersecret
5-
tag: 0.0.10
6-
# use tag-alt for ARM and other alternative builds - read the readme for more information
7-
# If Clustersecret is about to create a secret and then it founds it exists:
8-
# Default is to ignore it. (to not loose any unintentional data)
9-
# It can also reeplace it. Just uncommenting next line.
10-
# replace_existing: 'true'
1+
imagePullSecrets: []
2+
image:
3+
repository: quay.io/clustersecret/clustersecret
4+
tag: 0.0.10
5+
# use tag-alt for ARM and other alternative builds - read the readme for more information
6+
# If Clustersecret is about to create a secret and then it founds it exists:
7+
# Default is to ignore it. (to not loose any unintentional data)
8+
# It can also reeplace it. Just uncommenting next line.
9+
# replace_existing: 'true'
1110
kubernetesClusterDomain: cluster.local
11+
12+
13+
nodeSelector: {}
14+
15+
tolerations: []
16+
17+
affinity: {}

0 commit comments

Comments
 (0)