Skip to content

Commit

Permalink
Merge pull request #735 from opendevstack/feature/improve-helm-chart
Browse files Browse the repository at this point in the history
Mark important values as required
  • Loading branch information
michaelsauter authored Nov 6, 2023
2 parents 9dd32e1 + 6f1daa7 commit 1089a45
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ lint-shell: ## Run shellcheck.
shellcheck scripts/*.sh build/images/scripts/* deploy/*.sh
.PHONY: lint-shell

set_values = nexusUrl=http://example.com,bitbucketUrl=http://example.com,consoleUrl=http://example.com,pipelineManager.storageClassName=standard
docs: ## Render documentation for tasks.
renderedStartTask=$(shell mktemp); \
helm template ods-pipeline deploy/chart --show-only=templates/task-start.yaml > $$renderedStartTask; \
helm template ods-pipeline deploy/chart --show-only=templates/task-start.yaml --set $(set_values) > $$renderedStartTask; \
go run github.com/opendevstack/ods-pipeline/cmd/taskdoc \
-task $$renderedStartTask \
-description build/docs/task-start.adoc \
-destination docs/task-start.adoc; \
rm $$renderedStartTask

renderedFinishTask=$(shell mktemp); \
helm template ods-pipeline deploy/chart --show-only=templates/task-finish.yaml > $$renderedFinishTask; \
helm template ods-pipeline deploy/chart --show-only=templates/task-finish.yaml --set $(set_values) > $$renderedFinishTask; \
go run github.com/opendevstack/ods-pipeline/cmd/taskdoc \
-task $$renderedFinishTask \
-description build/docs/task-finish.adoc \
Expand Down
4 changes: 2 additions & 2 deletions deploy/chart/templates/configmap-bitbucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
labels:
{{- include "chart.labels" . | nindent 4}}
data:
url: '{{.Values.bitbucketUrl | trimSuffix "/"}}'
repoBase: '{{.Values.bitbucketUrl | trimSuffix "/"}}/scm'
url: '{{required "bitbucketUrl is required" .Values.bitbucketUrl | trimSuffix "/"}}'
repoBase: '{{required "bitbucketUrl is required" .Values.bitbucketUrl | trimSuffix "/"}}/scm'
2 changes: 1 addition & 1 deletion deploy/chart/templates/configmap-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
labels:
{{- include "chart.labels" . | nindent 4}}
data:
consoleUrl: '{{.Values.consoleUrl | trimSuffix "/"}}'
consoleUrl: '{{required "consoleUrl is required" .Values.consoleUrl | trimSuffix "/"}}'
2 changes: 1 addition & 1 deletion deploy/chart/templates/configmap-nexus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
labels:
{{- include "chart.labels" . | nindent 4}}
data:
url: '{{.Values.nexusUrl | trimSuffix "/"}}'
url: '{{required "nexusUrl is required" .Values.nexusUrl | trimSuffix "/"}}'
4 changes: 2 additions & 2 deletions deploy/chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ spec:
- name: ODS_STORAGE_PROVISIONER
value: '{{.Values.pipelineManager.storageProvisioner}}'
- name: ODS_STORAGE_CLASS_NAME
value: '{{.Values.pipelineManager.storageClassName}}'
value: '{{required "pipelineManager.storageClassName is required" .Values.pipelineManager.storageClassName}}'
- name: ODS_STORAGE_SIZE
value: '{{.Values.pipelineManager.storageSize}}'
value: '{{required "pipelineManager.storageSize is required" .Values.pipelineManager.storageSize}}'
- name: ODS_PRUNE_MIN_KEEP_HOURS
value: '{{int .Values.pipelineRunMinKeepHours}}'
- name: ODS_PRUNE_MAX_KEEP_RUNS
Expand Down
10 changes: 5 additions & 5 deletions deploy/chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ nexusUsername: ''

# Cluster
# URL (including scheme, without trailing slash) of the OpenShift Web Console.
consoleUrl: 'http://example.com'
consoleUrl: ''

# Notification Webhook
notification:
Expand Down Expand Up @@ -92,10 +92,10 @@ pipelineRunMaxKeepRuns: '20'
# Pipeline Manager
pipelineManager:
# PVC (used for the pipeline workspace)
# Storage provisioner. On AWS backed clusters, use 'kubernetes.io/aws-ebs'.
storageProvisioner: 'kubernetes.io/aws-ebs'
# Storage class. On AWS backed clusters, use 'gp2'.
storageClassName: 'gp2'
# Storage provisioner.
storageProvisioner: ''
# Storage class.
storageClassName: ''
# Storage size. Defaults to 2Gi unless set explicitly here.
storageSize: '5Gi'
# Number of replicas to run for the pipeline manager.
Expand Down
8 changes: 4 additions & 4 deletions deploy/values.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ consoleUrl: ''
# Pipeline Manager
pipelineManager:
# PVC (used for the pipeline workspace)
# Storage provisioner. On AWS backed clusters, use 'kubernetes.io/aws-ebs'.
storageProvisioner: 'kubernetes.io/aws-ebs'
# Storage class. On AWS backed clusters, use 'gp2'.
storageClassName: 'gp2'
# Storage provisioner. On AWS backed clusters, use e.g. 'ebs.csi.aws.com'.
storageProvisioner: ''
# Storage class. On AWS backed clusters, use e.g. 'gp3-csi'.
storageClassName: ''

0 comments on commit 1089a45

Please sign in to comment.