From df78e00df30a1df7f575d7db4a7282a4d4089eee Mon Sep 17 00:00:00 2001 From: Matt Moyer Date: Thu, 3 Jun 2021 13:24:26 -0500 Subject: [PATCH] Parameterize our test images in ytt. These are images we use for local and some CI testing. Signed-off-by: Matt Moyer --- test/deploy/tools/cert-issuer.yaml | 8 +++++--- test/deploy/tools/dex.yaml | 3 +-- test/deploy/tools/ldap.yaml | 3 +-- test/deploy/tools/proxy.yaml | 5 ++--- test/deploy/tools/values.yaml | 7 +++++++ 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/test/deploy/tools/cert-issuer.yaml b/test/deploy/tools/cert-issuer.yaml index 4e4a080f..5fa4c40a 100644 --- a/test/deploy/tools/cert-issuer.yaml +++ b/test/deploy/tools/cert-issuer.yaml @@ -1,5 +1,8 @@ #! Copyright 2020-2021 the Pinniped contributors. All Rights Reserved. #! SPDX-License-Identifier: Apache-2.0 + +#@ load("@ytt:data", "data") + --- apiVersion: v1 kind: ServiceAccount @@ -50,8 +53,7 @@ spec: serviceAccountName: cert-issuer initContainers: - name: generate-certs - image: cfssl/cfssl:1.5.0 - imagePullPolicy: IfNotPresent + image: #@ data.values.cfssl_image command: ["/bin/bash"] args: - -c @@ -108,7 +110,7 @@ spec: mountPath: /var/certs containers: - name: save-certs - image: bitnami/kubectl + image: #@ data.values.kubectl_image command: ["/bin/bash"] args: - -c diff --git a/test/deploy/tools/dex.yaml b/test/deploy/tools/dex.yaml index 8fe9e18b..39c3f886 100644 --- a/test/deploy/tools/dex.yaml +++ b/test/deploy/tools/dex.yaml @@ -68,8 +68,7 @@ spec: spec: containers: - name: dex - image: ghcr.io/dexidp/dex:v2.27.0 - imagePullPolicy: IfNotPresent + image: #@ data.values.dex_image command: - /usr/local/bin/dex - serve diff --git a/test/deploy/tools/ldap.yaml b/test/deploy/tools/ldap.yaml index ab771b10..b11095e1 100644 --- a/test/deploy/tools/ldap.yaml +++ b/test/deploy/tools/ldap.yaml @@ -209,8 +209,7 @@ spec: #! Use our own fork of docker.io/bitnami/openldap for now, because we added the #! LDAP_SERVER_CONFIG_BEFORE_CUSTOM_LDIF_DIR and LDAP_SERVER_CONFIG_AFTER_CUSTOM_LDIF_DIR options. #! See https://github.com/pinniped-ci-bot/bitnami-docker-openldap/tree/pinniped - image: projects.registry.vmware.com/pinniped/test-ldap:latest - imagePullPolicy: Always + image: #@ data.values.ldap_image ports: - name: ldap containerPort: 1389 diff --git a/test/deploy/tools/proxy.yaml b/test/deploy/tools/proxy.yaml index ae293a8a..c3913510 100644 --- a/test/deploy/tools/proxy.yaml +++ b/test/deploy/tools/proxy.yaml @@ -25,8 +25,7 @@ spec: emptyDir: {} containers: - name: proxy - image: projects.registry.vmware.com/pinniped/test-forward-proxy - imagePullPolicy: Always + image: #@ data.values.proxy_image ports: - name: http containerPort: 3128 @@ -48,7 +47,7 @@ spec: periodSeconds: 5 failureThreshold: 2 - name: accesslogs - image: debian:10.8-slim + image: #@ data.values.proxy_image command: - "/bin/sh" - "-c" diff --git a/test/deploy/tools/values.yaml b/test/deploy/tools/values.yaml index d22e902c..49a227d2 100644 --- a/test/deploy/tools/values.yaml +++ b/test/deploy/tools/values.yaml @@ -25,3 +25,10 @@ pinny_bcrypt_passwd_hash: #! The plaintext password of the LDAP test account user. pinny_ldap_password: + +#! Images for each of the deployed test components. +dex_image: ghcr.io/dexidp/dex:v2.27.0 +ldap_image: projects.registry.vmware.com/pinniped/test-ldap:latest +proxy_image: projects.registry.vmware.com/pinniped/test-forward-proxy:latest +cfssl_image: cfssl/cfssl:1.5.0 +kubectl_image: bitnami/kubectl:latest