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

Mark important values as required #735

Merged
merged 1 commit into from
Nov 6, 2023
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
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: ''
Loading