-
Notifications
You must be signed in to change notification settings - Fork 50
Rename helm resources #29
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f29390a
fix(helm): rename registry statefulset and related resources
plaffitt ffb4c60
chore(helm): rename kuik-webhook-service into kuik-webhook
plaffitt 8db8c09
chore(helm): rename kuik-mutating-webhook-configuration
plaffitt 4017ec6
chore(helm): prefix resources with kuik- instead of kube-image-keeper-
plaffitt 663e1d7
chore(helm): prefix all resources with kuik-
plaffitt fb88bd1
chore(helm): replace hardcoded kuik- prefixes with helm fullname helper
plaffitt 90548a3
chore(helm): rename kuik serviceaccount to kuik-controllers
plaffitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Certificate | ||
| metadata: | ||
| name: kuik-serving-cert | ||
| name: {{ include "kube-image-keeper.fullname" . }}-serving-cert | ||
| spec: | ||
| dnsNames: | ||
| - kuik-webhook-service.{{ .Release.Namespace }}.svc | ||
| - kuik-webhook-service.{{ .Release.Namespace }}.svc.cluster.local | ||
| secretName: webhook-server-cert | ||
| - {{ include "kube-image-keeper.fullname" . }}-webhook.{{ .Release.Namespace }}.svc | ||
| - {{ include "kube-image-keeper.fullname" . }}-webhook.{{ .Release.Namespace }}.svc.cluster.local | ||
| secretName: {{ include "kube-image-keeper.fullname" . }}-webhook-server-cert | ||
| issuerRef: | ||
| {{- toYaml .Values.controllers.webhook.certificateIssuerRef | nindent 4 }} | ||
| --- | ||
| {{- if .Values.controllers.webhook.createCertificateIssuer }} | ||
| apiVersion: cert-manager.io/v1 | ||
| kind: Issuer | ||
| metadata: | ||
| name: kuik-selfsigned-issuer | ||
| name: {{ include "kube-image-keeper.fullname" . }}-selfsigned-issuer | ||
| spec: | ||
| selfSigned: {} | ||
| {{- end -}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| #!/bin/bash | ||
|
|
||
| function test() { | ||
| local expected="$2" | ||
| local expected2='fullnameOverride' | ||
| output=$(helm template helm/kube-image-keeper/ -s templates/test-templating.yaml $1 | egrep '^kind:' | cut -c 7-) | ||
| output2=$(helm template helm/kube-image-keeper/ -s templates/test-templating.yaml $1 --set fullnameOverride=fullnameOverride | egrep '^kind:'| cut -c 7-) | ||
|
|
||
| echo "args: $1" | ||
| if [[ $expected == $output ]]; then | ||
| echo OK | ||
| else | ||
| echo -e "\033[0;31mKO: '$output' != '$expected'\033[0m" | ||
| fi | ||
|
|
||
| if [[ $expected2 == $output2 ]]; then | ||
| echo OK2 | ||
| else | ||
| echo -e "\033[0;31mKO2: '$output2' != '$expected2'\033[0m" | ||
| fi | ||
| echo "----------" | ||
| } | ||
|
|
||
| # has to be compatible with https://pkg.go.dev/helm.sh/helm/v3/pkg/releaseutil#SimpleHead | ||
| echo """ | ||
| kind: {{ include \"kube-image-keeper.fullname\" . }} | ||
| """ > helm/kube-image-keeper/templates/test-templating.yaml | ||
|
|
||
| # basic | ||
| test '' 'release-name-kuik' | ||
| test '--name-template foo' 'foo-kuik' | ||
| test '--set nameOverride=bar' 'release-name-bar' | ||
| test '--name-template foo --set nameOverride=bar' 'foo-bar' | ||
| test '--name-template foo --set nameOverride=foo' 'foo' | ||
|
|
||
| # replace kube-image-keeper by kuik | ||
| test '--name-template kube-image-keeper' 'kuik' | ||
| test '--name-template kuik' 'kuik' | ||
| ## with -release postfix | ||
| test '--name-template kuik-release' 'kuik-release' | ||
| test '--name-template kube-image-keeper-release' 'kuik-release' | ||
| ## with one missing letter | ||
| test '--name-template kui' 'kui-kuik' | ||
| test '--name-template kube-image-keepe' 'kube-image-keepe-kuik' | ||
|
|
||
| # merge duplicate names | ||
| test '--name-template kuik --set nameOverride=kuik' 'kuik' | ||
| test '--name-template kube-image-keeper --set nameOverride=kuik' 'kuik' | ||
| ## nameOverride should be taken in account as is and not be replaced | ||
| test '--name-template kuik --set nameOverride=kube-image-keeper' 'kuik-kube-image-keeper' | ||
| test '--name-template kube-image-keeper --set nameOverride=kube-image-keeper' 'kuik-kube-image-keeper' | ||
|
|
||
| rm -f helm/kube-image-keeper/templates/test-templating.yaml |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.