Skip to content

Commit

Permalink
ROX-22818: Move automation-flavor image version to a Chart annotation (
Browse files Browse the repository at this point in the history
  • Loading branch information
tommartensen authored Mar 7, 2024
1 parent 3f27514 commit d0d69e0
Show file tree
Hide file tree
Showing 19 changed files with 207 additions and 208 deletions.
1 change: 1 addition & 0 deletions chart/infra-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ sources:
- https://github.com/stackrox/infra
annotations:
acsDemoVersion: 4.3.4
automationFlavorsVersion: 0.10.4
ocpCredentialsMode: Passthrough
3 changes: 1 addition & 2 deletions chart/infra-server/static/test-connect-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
break
fi
done
echo {{ workflow.name }} {{ workflow.uid }} > /tmp/connect
echo {{ "{{" }} workflow.name {{ "}}" }} {{ "{{" }} workflow.uid {{ "}}" }} > /tmp/connect
- name: wait
suspend: {}
Expand All @@ -53,4 +53,3 @@ spec:
break
fi
done
3 changes: 1 addition & 2 deletions chart/infra-server/static/test-url-artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
break
fi
done
echo {{ workflow.name }} {{ workflow.uid }} > /tmp/url
echo {{ "{{" }} workflow.name {{ "}}" }} {{ "{{" }} workflow.uid {{ "}}" }} > /tmp/url
- name: wait
suspend: {}
Expand All @@ -53,4 +53,3 @@ spec:
break
fi
done
18 changes: 9 additions & 9 deletions chart/infra-server/static/workflow-aks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ spec:
archive:
tar: {}
container:
image: quay.io/stackrox-io/ci:automation-flavors-aks-0.10.1
image: quay.io/stackrox-io/ci:automation-flavors-aks-{{ .Chart.Annotations.automationFlavorsVersion }}
imagePullPolicy: Always
command:
- entrypoint
args:
- create
- "{{workflow.parameters.name}}"
- '{{ "{{" }}workflow.parameters.name{{ "}}" }}'
- srox-temp-dev-test
env:
- name: AZURE_SP_USERNAME
Expand All @@ -73,15 +73,15 @@ spec:
name: azure-secrets
key: AZURE_SP_TENANT
- name: NODE_COUNT
value: "{{workflow.parameters.nodes}}"
value: '{{ "{{" }}workflow.parameters.nodes{{ "}}" }}'
- name: INSTANCE_TYPE
value: "{{workflow.parameters.machine-type}}"
value: '{{ "{{" }}workflow.parameters.machine-type{{ "}}" }}'
- name: K8S_VERSION
value: "{{workflow.parameters.k8s-version}}"
value: '{{ "{{" }}workflow.parameters.k8s-version{{ "}}" }}'
- name: NETWORK_PLUGIN
value: "{{workflow.parameters.network-plugin}}"
value: '{{ "{{" }}workflow.parameters.network-plugin{{ "}}" }}'
- name: NETWORK_POLICY
value: "{{workflow.parameters.network-policy}}"
value: '{{ "{{" }}workflow.parameters.network-policy{{ "}}" }}'
- name: CREATION_SOURCE
value: "infra"
volumeMounts:
Expand All @@ -96,13 +96,13 @@ spec:

- name: destroy
container:
image: quay.io/stackrox-io/ci:automation-flavors-aks-0.10.1
image: quay.io/stackrox-io/ci:automation-flavors-aks-{{ .Chart.Annotations.automationFlavorsVersion }}
imagePullPolicy: Always
command:
- entrypoint
args:
- destroy
- "{{workflow.parameters.name}}"
- '{{ "{{" }}workflow.parameters.name{{ "}}" }}'
- srox-temp-dev-test
env:
- name: AZURE_SP_USERNAME
Expand Down
26 changes: 13 additions & 13 deletions chart/infra-server/static/workflow-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ spec:
arguments:
artifacts:
- name: roxctl
from: "{{steps.roxctl.outputs.artifacts.roxctl}}"
from: '{{ "{{" }}steps.roxctl.outputs.artifacts.roxctl{{ "}}" }}'

- - name: wait
template: wait
Expand All @@ -49,9 +49,9 @@ spec:
arguments:
artifacts:
- name: tfstate
from: "{{workflow.outputs.artifacts.global-tfstate}}"
from: '{{ "{{" }}workflow.outputs.artifacts.global-tfstate{{ "}}" }}'
- name: tfvars
from: "{{workflow.outputs.artifacts.global-tfvars}}"
from: '{{ "{{" }}workflow.outputs.artifacts.global-tfvars{{ "}}" }}'

- name: roxctl
activeDeadlineSeconds: 120
Expand All @@ -60,7 +60,7 @@ spec:
- name: roxctl
path: /tmp/roxctl
container:
image: "{{workflow.parameters.main-image}}"
image: '{{ "{{" }}workflow.parameters.main-image{{ "}}" }}'
imagePullPolicy: Always
command:
- cp
Expand Down Expand Up @@ -120,22 +120,22 @@ spec:
none: {}

container:
image: quay.io/stackrox-io/ci:automation-flavors-demo-0.9.13
image: quay.io/stackrox-io/ci:automation-flavors-demo-{{ .Chart.Annotations.automationFlavorsVersion }}
imagePullPolicy: Always
command:
- /usr/bin/entrypoint
args:
- create
- "--name={{workflow.parameters.name}}"
- "--main-image={{workflow.parameters.main-image}}"
- "--central-db-image={{workflow.parameters.central-db-image}}"
- --name={{ "{{" }}workflow.parameters.name{{ "}}" }}
- --main-image={{ "{{" }}workflow.parameters.main-image{{ "}}" }}
- --central-db-image={{ "{{" }}workflow.parameters.central-db-image{{ "}}" }}
- --gcp-project=acs-team-temp-dev
- --dns-gcp-project=acs-team-temp-dev
- --creation-source=infra
- --k8s-version={{workflow.parameters.k8s-version}}
- --enable-psps={{workflow.parameters.enable-psps}}
- --gcp-region={{workflow.parameters.gcp-region}}
- --gcp-zone={{workflow.parameters.gcp-zone}}
- --k8s-version={{ "{{" }}workflow.parameters.k8s-version{{ "}}" }}
- --enable-psps={{ "{{" }}workflow.parameters.enable-psps{{ "}}" }}
- --gcp-region={{ "{{" }}workflow.parameters.gcp-region{{ "}}" }}
- --gcp-zone={{ "{{" }}workflow.parameters.gcp-zone{{ "}}" }}
volumeMounts:
- name: credentials
mountPath: /tmp/google-credentials.json
Expand Down Expand Up @@ -188,7 +188,7 @@ spec:
path: /data/tfvars
optional: true
container:
image: quay.io/stackrox-io/ci:automation-flavors-demo-0.9.13
image: quay.io/stackrox-io/ci:automation-flavors-demo-{{ .Chart.Annotations.automationFlavorsVersion }}
imagePullPolicy: Always
command:
- /usr/bin/entrypoint
Expand Down
18 changes: 9 additions & 9 deletions chart/infra-server/static/workflow-eks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ spec:
archive:
tar: {}
container:
image: quay.io/stackrox-io/ci:automation-flavors-eks-0.6.9
image: quay.io/stackrox-io/ci:automation-flavors-eks-{{ .Chart.Annotations.automationFlavorsVersion }}
imagePullPolicy: Always
command:
- entrypoint
args:
- create
- "{{workflow.parameters.name}}"
- '{{ "{{" }}workflow.parameters.name{{ "}}" }}'
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
Expand All @@ -62,17 +62,17 @@ spec:
name: aws-access-secrets
key: AWS_SECRET_ACCESS_KEY
- name: NODE_COUNT
value: "{{workflow.parameters.nodes}}"
value: '{{ "{{" }}workflow.parameters.nodes{{ "}}" }}'
- name: INSTANCE_TYPE
value: "{{workflow.parameters.machine-type}}"
value: '{{ "{{" }}workflow.parameters.machine-type{{ "}}" }}'
- name: K8S_VERSION
value: "{{workflow.parameters.k8s-version}}"
value: '{{ "{{" }}workflow.parameters.k8s-version{{ "}}" }}'
- name: USER_ARNS
value: "{{workflow.parameters.user-arns}}"
value: '{{ "{{" }}workflow.parameters.user-arns{{ "}}" }}'
- name: CREATION_SOURCE
value: "infra"
- name: REGION
value: "{{workflow.parameters.region}}"
value: '{{ "{{" }}workflow.parameters.region{{ "}}" }}'

volumeMounts:
- name: data
Expand All @@ -87,13 +87,13 @@ spec:
- name: destroy
activeDeadlineSeconds: 3600
container:
image: quay.io/stackrox-io/ci:automation-flavors-eks-0.6.9
image: quay.io/stackrox-io/ci:automation-flavors-eks-{{ .Chart.Annotations.automationFlavorsVersion }}
command:
- entrypoint
imagePullPolicy: Always
args:
- destroy
- "{{workflow.parameters.name}}"
- '{{ "{{" }}workflow.parameters.name{{ "}}" }}'
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
Expand Down
24 changes: 12 additions & 12 deletions chart/infra-server/static/workflow-gke-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
arguments:
parameters:
- name: name
value: "{{steps.create.outputs.parameters.cluster_name}}"
value: '{{ "{{" }}steps.create.outputs.parameters.cluster_name{{ "}}" }}'

- name: create
activeDeadlineSeconds: 3600
Expand All @@ -60,21 +60,21 @@ spec:
valueFrom:
path: /outputs/cluster_name
container:
image: quay.io/stackrox-io/ci:automation-flavors-gke-default-0.9.21
image: quay.io/stackrox-io/ci:automation-flavors-gke-default-{{ .Chart.Annotations.automationFlavorsVersion }}
imagePullPolicy: Always
command:
- /usr/bin/entrypoint
args:
- create
- "--name={{workflow.parameters.name}}"
- "--nodes={{workflow.parameters.nodes}}"
- "--machine-type={{workflow.parameters.machine-type}}"
- --name={{ "{{" }}workflow.parameters.name{{ "}}" }}
- --nodes={{ "{{" }}workflow.parameters.nodes{{ "}}" }}
- --machine-type={{ "{{" }}workflow.parameters.machine-type{{ "}}" }}
- --gcp-project=acs-team-temp-dev
- --creation-source=infra
- --k8s-version={{workflow.parameters.k8s-version}}
- --pod-security-policy={{workflow.parameters.pod-security-policy}}
- --gcp-image-type={{workflow.parameters.gcp-image-type}}
- --gcp-zone={{workflow.parameters.gcp-zone}}
- --k8s-version={{ "{{" }}workflow.parameters.k8s-version{{ "}}" }}
- --pod-security-policy={{ "{{" }}workflow.parameters.pod-security-policy{{ "}}" }}
- --gcp-image-type={{ "{{" }}workflow.parameters.gcp-image-type{{ "}}" }}
- --gcp-zone={{ "{{" }}workflow.parameters.gcp-zone{{ "}}" }}
volumeMounts:
- name: credentials
mountPath: /tmp
Expand All @@ -85,15 +85,15 @@ spec:
- name: destroy
activeDeadlineSeconds: 3600
container:
image: quay.io/stackrox-io/ci:automation-flavors-gke-default-0.9.21
image: quay.io/stackrox-io/ci:automation-flavors-gke-default-{{ .Chart.Annotations.automationFlavorsVersion }}
imagePullPolicy: Always
command:
- /usr/bin/entrypoint
args:
- destroy
- "--name={{workflow.parameters.name}}"
- --name={{ "{{" }}workflow.parameters.name{{ "}}" }}
- --gcp-project=acs-team-temp-dev
- --gcp-zone={{workflow.parameters.gcp-zone}}
- --gcp-zone={{ "{{" }}workflow.parameters.gcp-zone{{ "}}" }}
volumeMounts:
- name: credentials
mountPath: /tmp
Loading

0 comments on commit d0d69e0

Please sign in to comment.