Skip to content
Merged
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,11 @@ endif

.PHONY: helm-dependency-update
helm-dependency-update:
@helm dependency update chart/infra-server
@helm dependency update chart/infra-server >&2

create-namespaces:
@kubectl create namespace argo >/dev/null 2>&1 || echo "namespace/argo already exists"; exit 0
@kubectl create namespace monitoring >/dev/null 2>&1 || echo "namespace/monitoring already exists"; exit 0
@kubectl create namespace argo >/dev/null 2>&1 || echo "namespace/argo already exists" >&2; exit 0
@kubectl create namespace monitoring >/dev/null 2>&1 || echo "namespace/monitoring already exists" >&2; exit 0

## Render template
.PHONY: helm-template
Expand Down
3 changes: 3 additions & 0 deletions chart/infra-server/argo-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ argo-workflows:
server:
authModes:
- server
# We install the CRDs separately, because they cannot be upgraded with Helm through the dependant chart.
crds:
install: false

controller:
# Default values that will apply to all Workflows from this controller, unless overridden on the Workflow-level
Expand Down
14 changes: 13 additions & 1 deletion chart/infra-server/static/flavors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@
name: OpenShift 4.x Perf&Scale
description: OpenShift 4.x Perf&Scale
availability: stable
workflow: configuration/workflow-openshift-4-perf-scale.yaml
workflow: configuration/workflow-openshift-4.yaml
aliases:
- ocp-4-perf-scale
parameters:
Expand Down Expand Up @@ -576,6 +576,11 @@
value: false
kind: optional

- name: install-hypershift
description: should Hypershift be installed
value: false
kind: optional

- name: trusted-certs-enabled
description: Should trusted certificates be created
value: false
Expand All @@ -589,6 +594,13 @@
Consult OCP documentation for details. {{ .Chart.Annotations.ocpCredentialsMode }} is the value used by
stackrox CI.

- name: keep-failed-cluster
description: Keep failed cluster
value: false
kind: optional
help: |
*Only for debugging infra issues.* If in doubt, please keep to false.

- name: ssd-storage-class
description: Ensure an SSD StorageClass is the default StorageClass for the cluster
value: true
Expand Down
4 changes: 2 additions & 2 deletions chart/infra-server/static/test-qa-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ spec:

- name: whalesay
container:
image: docker/whalesay:latest
command: [cowsay]
image: busybox:latest
command: [echo]
Comment thread
tommartensen marked this conversation as resolved.
args:
- "hello world to: "
- '{{ "{{" }}workflow.parameters.name{{ "}}" }}'
Expand Down
84 changes: 19 additions & 65 deletions chart/infra-server/static/test-simulate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ spec:

templates:
- name: start
steps:
- - name: create
template: simulate
dag:
tasks:
- name: create
templateRef:
name: test-simulate
template: simulate
arguments:
parameters:
- name: delay-seconds
Expand All @@ -37,12 +40,20 @@ spec:
value: '{{ "{{" }}workflow.parameters.create-outcome{{ "}}" }}'
- name: test-gcs
value: '{{ "{{"}}workflow.parameters.test-gcs{{ "}}" }}'
- - name: wait
template: wait

- name: wait
dependencies: [create]
templateRef:
name: common
template: wait

- name: stop
steps:
- - name: destroy
template: simulate
dag:
tasks:
- name: destroy
templateRef:
name: test-simulate
template: simulate
arguments:
parameters:
- name: delay-seconds
Expand All @@ -51,60 +62,3 @@ spec:
value: '{{ "{{" }}workflow.parameters.destroy-outcome{{ "}}" }}'
- name: test-gcs
value: '{{ "{{"}}workflow.parameters.test-gcs{{ "}}" }}'

- name: simulate
inputs:
parameters:
- name: delay-seconds
- name: outcome
- name: test-gcs
script:
image: gcr.io/google.com/cloudsdktool/google-cloud-cli:stable
command: [bash]
source: |
set -x

delay() {
start=0
while sleep 1; do
if [[ $((start++)) -ge {{ "{{" }}inputs.parameters.delay-seconds{{ "}}" }} ]]; then
break
fi
done
}

upload_or_delete_gcs_object() {
gcloud auth activate-service-account --key-file /tmp/google-credentials.json
gcloud config set core/disable_prompts True

BUCKET_NAME="infra-e2e-upload-test"
FILE="{{ "{{" }}workflow.name{{ "}}" }}"
touch "${FILE}"

DESTINATION="gs://${BUCKET_NAME}/${FILE}"

if gsutil -q stat "${DESTINATION}"; then
echo "File exists. Deleting..."
gsutil rm "${DESTINATION}"
else
echo "File does not exist. Proceeding to upload."
gsutil cp "${FILE}" "${DESTINATION}"
fi
}

if [[ "{{ "{{" }}inputs.parameters.test-gcs{{ "}}" }}" == "true" ]]; then
upload_or_delete_gcs_object
fi

if [[ {{ "{{" }}inputs.parameters.delay-seconds{{ "}}" }} -gt 0 ]]; then
delay
fi

[[ "{{ "{{" }}inputs.parameters.outcome{{ "}}" }}" == "success" ]] || exit 1

volumeMounts:
- name: credentials
mountPath: /tmp

- name: wait
suspend: {}
184 changes: 0 additions & 184 deletions chart/infra-server/static/workflow-openshift-4-perf-scale.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions chart/infra-server/templates/secrets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ data:
workflow-openshift-4-demo.yaml: |-
{{- tpl (.Files.Get "static/workflow-openshift-4-demo.yaml" ) . | b64enc | nindent 4 }}

workflow-openshift-4-perf-scale.yaml: |-
{{- tpl (.Files.Get "static/workflow-openshift-4-perf-scale.yaml" ) . | b64enc | nindent 4 }}

workflow-eks.yaml: |-
{{- tpl (.Files.Get "static/workflow-eks.yaml" ) . | b64enc | nindent 4 }}

Expand Down
10 changes: 10 additions & 0 deletions chart/infra-server/templates/workflowtemplates/common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: common
namespace: default
spec:
templates:
- name: wait
suspend: {}
Loading
Loading