-
-
Notifications
You must be signed in to change notification settings - Fork 15
fix(ckan): align template standards #652
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
+259
−36
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,37 +1,107 @@ | ||
| {{/* SPDX-License-Identifier: Apache-2.0 */}} | ||
| CKAN {{ .Chart.AppVersion }} has been installed. | ||
|
|
||
| 1. Installation summary | ||
| ----------------------- | ||
| Release: {{ .Release.Name }} | ||
| Namespace: {{ .Release.Namespace }} | ||
| Chart version: {{ .Chart.Version }} | ||
| Application version: {{ .Chart.AppVersion }} | ||
| Image: {{ include "ckan.image" . }} | ||
| Service name: {{ include "ckan.fullname" . }} | ||
| Service type: {{ .Values.service.type }} | ||
| Service port: {{ .Values.service.port }} | ||
|
|
||
| 2. Access | ||
| --------- | ||
| {{- if .Values.ingress.enabled }} | ||
| Ingress routes: | ||
| {{- range .Values.ingress.hosts }} | ||
| Web UI: http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }} | ||
| {{- if .host }} | ||
| - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ .host }}/ | ||
| {{- else }} | ||
| - catch-all host on the configured ingress controller | ||
| {{- end }} | ||
| {{- end }} | ||
| {{- else }} | ||
| kubectl port-forward svc/{{ include "ckan.fullname" . }} 5000:{{ .Values.service.port }} | ||
| Web UI: http://localhost:5000 | ||
| Port-forward the Service: | ||
|
|
||
| kubectl -n {{ .Release.Namespace }} port-forward svc/{{ include "ckan.fullname" . }} 5000:{{ .Values.service.port }} | ||
|
|
||
| Then open: | ||
|
|
||
| http://localhost:5000/ | ||
| {{- end }} | ||
|
|
||
| Default credentials: {{ .Values.ckan.sysadminName }} / (check secret {{ include "ckan.secretName" . }}) | ||
| Cluster-local endpoint: | ||
|
|
||
| http://{{ include "ckan.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local:{{ .Values.service.port }}/ | ||
|
|
||
| 3. Credentials | ||
| -------------- | ||
| Sysadmin username: {{ .Values.ckan.sysadminName }} | ||
| Sysadmin password secret: {{ include "ckan.secretName" . }} | ||
| Sysadmin password key: {{ .Values.ckan.existingSecretPasswordKey | default "sysadmin-password" }} | ||
|
|
||
| Inspect generated credentials: | ||
|
|
||
| kubectl -n {{ .Release.Namespace }} get secret {{ include "ckan.secretName" . }} | ||
|
|
||
| 4. Runtime components | ||
| --------------------- | ||
| PostgreSQL subchart: {{ ternary "enabled" "disabled" .Values.postgresql.enabled }} | ||
| Redis subchart: {{ ternary "enabled" "disabled" .Values.redis.enabled }} | ||
| Solr: {{ ternary "enabled" "external" .Values.solr.enabled }} | ||
| DataPusher: {{ ternary "enabled" "disabled" .Values.datapusher.enabled }} | ||
| Backup CronJob: {{ ternary "enabled" "disabled" .Values.backup.enabled }} | ||
|
|
||
| Runtime: | ||
| Image: {{ include "ckan.image" . }} | ||
| PostgreSQL subchart: {{ ternary "enabled" "disabled" .Values.postgresql.enabled }} | ||
| Redis subchart: {{ ternary "enabled" "disabled" .Values.redis.enabled }} | ||
| Solr: {{ ternary "enabled" "external" .Values.solr.enabled }} | ||
| DataPusher: {{ ternary "enabled" "disabled" .Values.datapusher.enabled }} | ||
| Backup CronJob: {{ ternary "enabled" "disabled" .Values.backup.enabled }} | ||
| 5. Operational checks | ||
| --------------------- | ||
| Wait for CKAN: | ||
|
|
||
| kubectl -n {{ .Release.Namespace }} rollout status deploy/{{ include "ckan.fullname" . }} --timeout=300s | ||
|
|
||
| Inspect workload status: | ||
|
|
||
| Checks: | ||
| kubectl -n {{ .Release.Namespace }} get pods -l app.kubernetes.io/instance={{ .Release.Name }} | ||
| kubectl -n {{ .Release.Namespace }} logs deploy/{{ include "ckan.fullname" . }} --tail=100 | ||
| kubectl -n {{ .Release.Namespace }} get events --sort-by=.lastTimestamp | ||
|
|
||
| 6. Storage and backup | ||
| --------------------- | ||
| {{- if .Values.persistence.enabled }} | ||
| CKAN file storage persistence is enabled. | ||
| PVC: {{ .Values.persistence.existingClaim | default (printf "%s-storage" (include "ckan.fullname" .)) }} | ||
| {{- else }} | ||
| CKAN file storage persistence is disabled and uses emptyDir. | ||
| {{- end }} | ||
|
|
||
| {{- if .Values.backup.enabled }} | ||
| Scheduled PostgreSQL backups are enabled. | ||
| Backup CronJob: {{ include "ckan.fullname" . }}-backup | ||
| {{- else }} | ||
| Scheduled PostgreSQL backups are disabled. | ||
| {{- end }} | ||
|
|
||
| 7. Troubleshooting | ||
| ------------------ | ||
| Inspect CKAN and dependencies: | ||
|
|
||
| kubectl -n {{ .Release.Namespace }} describe deploy/{{ include "ckan.fullname" . }} | ||
| {{- if .Values.postgresql.enabled }} | ||
| kubectl -n {{ .Release.Namespace }} logs statefulset/{{ .Release.Name }}-postgresql --tail=80 | ||
| {{- end }} | ||
| {{- if .Values.redis.enabled }} | ||
| kubectl -n {{ .Release.Namespace }} logs statefulset/{{ .Release.Name }}-redis --tail=80 | ||
| {{- end }} | ||
| {{- if .Values.solr.enabled }} | ||
| kubectl -n {{ .Release.Namespace }} logs statefulset/{{ include "ckan.fullname" . }}-solr --tail=80 | ||
| {{- end }} | ||
|
|
||
| Upgrade reminder: | ||
| Take a PostgreSQL backup and confirm CKAN plugins before production upgrades. | ||
| 8. Resources | ||
| ------------ | ||
| Chart docs: https://helmforge.dev/docs/charts/ckan | ||
| Chart source: https://github.com/helmforgedev/charts/tree/main/charts/ckan | ||
| Upstream project: https://ckan.org | ||
|
|
||
| Happy Helmforging :) |
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,2 @@ | ||
| {{/* SPDX-License-Identifier: Apache-2.0 */}} | ||
| {{- include "ckan.validate" . -}} |
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,112 @@ | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| suite: Validation | ||
| templates: | ||
| - templates/validate.yaml | ||
| tests: | ||
| - it: should render no validation manifest by default | ||
| asserts: | ||
| - hasDocuments: | ||
| count: 0 | ||
|
|
||
| - it: should fail when external database host is missing | ||
| set: | ||
| database.mode: external | ||
| database.external.password: secret | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "database.external.host is required when database.mode is external" | ||
|
|
||
| - it: should fail when external database credentials are missing | ||
| set: | ||
| database.mode: external | ||
| database.external.host: postgresql.example.com | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "database.external.password or database.external.existingSecret is required when database.mode is external" | ||
|
|
||
| - it: should fail when external redis url is missing | ||
| set: | ||
| redisConfig.mode: external | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "redisConfig.external.url is required when redisConfig.mode is external" | ||
|
|
||
| - it: should fail when external solr url is missing | ||
| set: | ||
| solr.enabled: false | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "solr.externalUrl is required when solr.enabled is false" | ||
|
|
||
| - it: should fail when ingress is enabled without rules | ||
| set: | ||
| ingress.enabled: true | ||
| ingress.hosts: [] | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "ingress.enabled requires ingress.hosts to contain at least one rule" | ||
|
|
||
| - it: should fail when backup endpoint is missing | ||
| set: | ||
| backup.enabled: true | ||
| backup.s3.bucket: backups | ||
| backup.s3.accessKey: access | ||
| backup.s3.secretKey: secret | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "backup.s3.endpoint is required when backup.enabled is true" | ||
|
|
||
| - it: should fail when backup bucket is missing | ||
| set: | ||
| backup.enabled: true | ||
| backup.s3.endpoint: http://minio:9000 | ||
| backup.s3.accessKey: access | ||
| backup.s3.secretKey: secret | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "backup.s3.bucket is required when backup.enabled is true" | ||
|
|
||
| - it: should fail when backup access key is missing | ||
| set: | ||
| backup.enabled: true | ||
| backup.s3.endpoint: http://minio:9000 | ||
| backup.s3.bucket: backups | ||
| backup.s3.secretKey: secret | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "backup.s3.accessKey or backup.s3.existingSecret is required when backup.enabled is true" | ||
|
|
||
| - it: should fail when backup secret key is missing | ||
| set: | ||
| backup.enabled: true | ||
| backup.s3.endpoint: http://minio:9000 | ||
| backup.s3.bucket: backups | ||
| backup.s3.accessKey: access | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: "backup.s3.secretKey or backup.s3.existingSecret is required when backup.enabled is true" | ||
|
|
||
| - it: should fail when podLabels override selector labels | ||
| set: | ||
| podLabels: | ||
| app.kubernetes.io/component: custom | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: 'podLabels must not override selector label "app.kubernetes.io/component"' | ||
|
|
||
| - it: should fail when datapusher podLabels override selector labels | ||
| set: | ||
| datapusher.podLabels: | ||
| app.kubernetes.io/name: custom | ||
| asserts: | ||
| - failedTemplate: | ||
| errorMessage: 'datapusher.podLabels must not override selector label "app.kubernetes.io/name"' | ||
|
|
||
| - it: should allow datapusher podLabels when datapusher is disabled | ||
| set: | ||
| datapusher.enabled: false | ||
| datapusher.podLabels: | ||
| app.kubernetes.io/name: custom | ||
| asserts: | ||
| - hasDocuments: | ||
| count: 0 |
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.