From c74ab882cc778189da3f7ed3229fa5151e3766d5 Mon Sep 17 00:00:00 2001 From: Mark Lopez Date: Mon, 29 Aug 2022 11:14:58 -0500 Subject: [PATCH] Added Quary manifest generation. --- .github/workflows/pipeline.yml | 26 +++++++++++++++---- README.md | 4 +-- .../install/prod-quay/kustomization.yaml | 23 ++++++++++++++++ 3 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 manifests/install/prod-quay/kustomization.yaml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index dfe36726..8c7fc92d 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -88,20 +88,36 @@ jobs: BUILD_VERSION: ${{ needs.generate-version.outputs.version }} steps: - uses: actions/checkout@v3 - - name: Generate Manifests + - uses: imranismail/setup-kustomize@v1 + - name: Generate Manifests (Prod) run: | set -xe cd ./manifests/install/prod - curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash - ./kustomize edit set image 'contrast/agent-operator:${{ env.BUILD_VERSION }}' + kustomize edit set image 'contrast/agent-operator:${{ env.BUILD_VERSION }}' cat ../../license-header.yaml > ./install-prod.yaml - ./kustomize build ./ >> ./install-prod.yaml + kustomize build ./ >> ./install-prod.yaml + shell: bash + - name: Generate Manifests (Prod-Quay) + run: | + set -xe + cd ./manifests/install/prod-quay + kustomize edit set image 'quay.io/contrast/agent-operator:${{ env.BUILD_VERSION }}' + cat ../../license-header.yaml > ./install-prod-quay.yaml + kustomize build ./ >> ./install-prod-quay.yaml + shell: bash + - name: Stage Manifests + run: | + set -xe + cp manifests/install/prod/install-prod.yaml ./install-prod.yaml + cp manifests/install/prod-quay/install-prod-quay.yaml ./install-prod-quay.yaml shell: bash - name: Publish (Artifacts) uses: actions/upload-artifact@v3 with: name: manifests - path: manifests/install/prod/install-prod.yaml + path: | + install-prod.yaml + install-prod-quay.yaml retention-days: 7 test-image: runs-on: ubuntu-latest diff --git a/README.md b/README.md index f5fab25e..2daf51f6 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Further documentation and examples can be found on [docs.contrastsecurity.com](h ## Releases -Builds released into the the `public` environment are are published to DockerHub. Manifests are uploaded to the [GitHub releases page](https://github.com/Contrast-Security-OSS/agent-operator/releases). +Builds released into the the `public` environment are are published to DockerHub and Quay. Manifests are uploaded to the [GitHub releases page](https://github.com/Contrast-Security-OSS/agent-operator/releases). Releases are tagged using the following format: @@ -46,7 +46,7 @@ contrast/agent-operator:1 contrast/agent-operator:latest ``` -See [DockerHub tags](https://hub.docker.com/r/contrast/agent-operator/tags) for a list of all available tags. +See [DockerHub tags](https://hub.docker.com/r/contrast/agent-operator/tags) or [Quay tags](https://quay.io/repository/contrast/agent-operator?tab=tags) for a list of all available tags. ## Contributing diff --git a/manifests/install/prod-quay/kustomization.yaml b/manifests/install/prod-quay/kustomization.yaml new file mode 100644 index 00000000..b53a72f3 --- /dev/null +++ b/manifests/install/prod-quay/kustomization.yaml @@ -0,0 +1,23 @@ +bases: + - ../prod + +images: + - name: contrast/agent-operator + newName: quay.io/contrast/agent-operator + newTag: latest + +patchesStrategicMerge: + - |- + apiVersion: apps/v1 + kind: Deployment + metadata: + name: contrast-agent-operator + namespace: contrast-agent-operator + spec: + template: + spec: + containers: + - name: contrast-agent-operator + env: + - name: CONTRAST_DEFAULT_REGISTRY + value: "quay.io/contrast"