diff --git a/install/installer/pkg/config/v1/envvars.go b/install/installer/pkg/config/v1/envvars.go index 0273393c1cace7..4e632543820460 100644 --- a/install/installer/pkg/config/v1/envvars.go +++ b/install/installer/pkg/config/v1/envvars.go @@ -41,7 +41,7 @@ func isTruthy(input string) bool { // ConfigEnvvars this maps the external environment variables to Golang values and forms part of our public contract type ConfigEnvvars struct { AdvancedModeEnabled bool `env:"ADVANCED_MODE_ENABLED"` - ComponentProxyServiceType string `env:"COMPONENT_PROXY_SERVICE_SERVICETYPE"` + ComponentProxyServiceType string `env:"COMPONENT_PROXY_SERVICE_TYPE"` ConfigPatch string `env:"CONFIG_PATCH"` CustomizationPatch string `env:"CUSTOMIZATION_PATCH"` DBCloudSQLEnabled bool `env:"DB_CLOUDSQL_ENABLED"` @@ -60,16 +60,16 @@ type ConfigEnvvars struct { LocalRegistryHost string `env:"LOCAL_REGISTRY_HOST"` LocalRegistryImagePullConfig string `env:"LOCAL_REGISTRY_IMAGE_PULL_DOCKER_CONFIG_JSON"` OpenVSXUrl string `env:"OPEN_VSX_URL"` - RegistryDockerConfigEnabled bool `env:"REG_DOCKER_CONFIG_ENABLED"` - RegistryDockerConfig string `env:"REG_DOCKER_CONFIG_JSON"` - RegistryInClusterEnabled bool `env:"REG_INCLUSTER_ENABLED" envDefault:"1"` - RegistryInClusterStorageType string `env:"REG_INCLUSTER_STORAGE"` - RegistryInClusterStorageS3BucketName string `env:"REG_INCLUSTER_STORAGE_S3_BUCKETNAME"` - RegistryInClusterStorageS3CertName string `env:"REG_INCLUSTER_STORAGE_S3_CERTIFICATE_NAME"` - RegistryInClusterStorageS3Endpoint string `env:"REG_INCLUSTER_STORAGE_S3_ENDPOINT"` - RegistryInClusterStorageS3Region string `env:"REG_INCLUSTER_STORAGE_S3_REGION"` - RegistryExternalCertName string `env:"REG_EXTERNAL_CERTIFICATE_NAME"` - RegistryExternalURL string `env:"REG_URL"` + RegistryDockerConfigEnabled bool `env:"REGISTRY_DOCKER_CONFIG_ENABLED"` + RegistryDockerConfig string `env:"REGISTRY_DOCKER_CONFIG_JSON"` + RegistryInClusterEnabled bool `env:"REGISTRY_INCLUSTER_ENABLED" envDefault:"1"` + RegistryInClusterStorageType string `env:"REGISTRY_INCLUSTER_STORAGE"` + RegistryInClusterStorageS3BucketName string `env:"REGISTRY_INCLUSTER_STORAGE_S3_BUCKET_NAME"` + RegistryInClusterStorageS3CertName string `env:"REGISTRY_INCLUSTER_STORAGE_S3_CERTIFICATE_NAME"` + RegistryInClusterStorageS3Endpoint string `env:"REGISTRY_INCLUSTER_STORAGE_S3_ENDPOINT"` + RegistryInClusterStorageS3Region string `env:"REGISTRY_INCLUSTER_STORAGE_S3_REGION"` + RegistryExternalCertName string `env:"REGISTRY_EXTERNAL_CERTIFICATE_NAME"` + RegistryExternalURL string `env:"REGISTRY_URL"` SSHGatewayEnabled bool `env:"SSH_GATEWAY"` SSHGatewayHostKeyName string `env:"SSH_GATEWAY_HOST_KEY_NAME"` StorageProvider string `env:"STORE_PROVIDER" envDefault:"incluster"` diff --git a/install/installer/pkg/config/v1/testdata/envvars/additional-registry/envvars.yaml b/install/installer/pkg/config/v1/testdata/envvars/additional-registry/envvars.yaml index 99933c5c342216..31cb13e6dbe8ec 100644 --- a/install/installer/pkg/config/v1/testdata/envvars/additional-registry/envvars.yaml +++ b/install/installer/pkg/config/v1/testdata/envvars/additional-registry/envvars.yaml @@ -3,5 +3,5 @@ envvars: DOMAIN: gitpod.io - REG_DOCKER_CONFIG_ENABLED: "1" - REG_DOCKER_CONFIG_JSON: '{ "auths": { "host1": "", "host2": "", "host3": "" } }' + REGISTRY_DOCKER_CONFIG_ENABLED: "1" + REGISTRY_DOCKER_CONFIG_JSON: '{ "auths": { "host1": "", "host2": "", "host3": "" } }' diff --git a/install/installer/pkg/config/v1/testdata/envvars/aws/envvars.yaml b/install/installer/pkg/config/v1/testdata/envvars/aws/envvars.yaml index cc03a15dcf7eb3..f137062abb1fb7 100644 --- a/install/installer/pkg/config/v1/testdata/envvars/aws/envvars.yaml +++ b/install/installer/pkg/config/v1/testdata/envvars/aws/envvars.yaml @@ -5,12 +5,12 @@ envvars: DB_INCLUSTER_ENABLED: "0" DB_EXTERNAL_CERTIFICATE_NAME: database-secret DOMAIN: gitpod.io - REG_INCLUSTER_ENABLED: "1" - REG_INCLUSTER_STORAGE_S3_BUCKETNAME: container-s3-bucket - REG_INCLUSTER_STORAGE_S3_CERTIFICATE_NAME: container-s3-secret - REG_INCLUSTER_STORAGE_S3_ENDPOINT: container-s3-bucket.com - REG_INCLUSTER_STORAGE_S3_REGION: container-s3-region - REG_INCLUSTER_STORAGE: s3 + REGISTRY_INCLUSTER_ENABLED: "1" + REGISTRY_INCLUSTER_STORAGE_S3_BUCKET_NAME: container-s3-bucket + REGISTRY_INCLUSTER_STORAGE_S3_CERTIFICATE_NAME: container-s3-secret + REGISTRY_INCLUSTER_STORAGE_S3_ENDPOINT: container-s3-bucket.com + REGISTRY_INCLUSTER_STORAGE_S3_REGION: container-s3-region + REGISTRY_INCLUSTER_STORAGE: s3 STORE_PROVIDER: s3 STORE_REGION: s3-region STORE_S3_BUCKET: s3-bucket diff --git a/install/installer/pkg/config/v1/testdata/envvars/azure/envvars.yaml b/install/installer/pkg/config/v1/testdata/envvars/azure/envvars.yaml index 6c031222c83f0b..6d2b260cd6f7fc 100644 --- a/install/installer/pkg/config/v1/testdata/envvars/azure/envvars.yaml +++ b/install/installer/pkg/config/v1/testdata/envvars/azure/envvars.yaml @@ -5,9 +5,9 @@ envvars: DB_INCLUSTER_ENABLED: "0" DB_EXTERNAL_CERTIFICATE_NAME: azure-db-secret DOMAIN: gitpod.io - REG_INCLUSTER_ENABLED: "0" - REG_EXTERNAL_CERTIFICATE_NAME: azure-reg-secret - REG_URL: azure-reg-url + REGISTRY_INCLUSTER_ENABLED: "0" + REGISTRY_EXTERNAL_CERTIFICATE_NAME: azure-reg-secret + REGISTRY_URL: azure-reg-url STORE_PROVIDER: azure STORE_REGION: azure-region STORE_AZURE_CREDENTIALS_NAME: azure-store-secret diff --git a/install/installer/pkg/config/v1/testdata/envvars/gcp/envvars.yaml b/install/installer/pkg/config/v1/testdata/envvars/gcp/envvars.yaml index 2b7db57d5c8bc1..acc06730335cb3 100644 --- a/install/installer/pkg/config/v1/testdata/envvars/gcp/envvars.yaml +++ b/install/installer/pkg/config/v1/testdata/envvars/gcp/envvars.yaml @@ -7,9 +7,9 @@ envvars: DB_CLOUDSQL_INSTANCE: gcp-db-instance DB_CLOUDSQL_ENABLED: "1" DOMAIN: gitpod.io - REG_INCLUSTER_ENABLED: "0" - REG_EXTERNAL_CERTIFICATE_NAME: gcp-reg-secret - REG_URL: gcp-reg-url + REGISTRY_INCLUSTER_ENABLED: "0" + REGISTRY_EXTERNAL_CERTIFICATE_NAME: gcp-reg-secret + REGISTRY_URL: gcp-reg-url STORE_PROVIDER: gcp STORE_REGION: gcp-region STORE_GCP_PROJECT: gcp-project-name diff --git a/install/installer/pkg/config/v1/testdata/envvars/service-type/envvars.yaml b/install/installer/pkg/config/v1/testdata/envvars/service-type/envvars.yaml index ca2c9c370e3126..02e0e56792591d 100644 --- a/install/installer/pkg/config/v1/testdata/envvars/service-type/envvars.yaml +++ b/install/installer/pkg/config/v1/testdata/envvars/service-type/envvars.yaml @@ -3,5 +3,5 @@ envvars: ADVANCED_MODE_ENABLED: "1" - COMPONENT_PROXY_SERVICE_SERVICETYPE: ClusterIP + COMPONENT_PROXY_SERVICE_TYPE: ClusterIP DOMAIN: gitpod.io diff --git a/install/installer/scripts/kots-install.sh b/install/installer/scripts/kots-install.sh index bdc10112482779..f968bc81b3d1d6 100755 --- a/install/installer/scripts/kots-install.sh +++ b/install/installer/scripts/kots-install.sh @@ -91,7 +91,7 @@ EOF # Combine the pull secrets echo "${LOCAL_REGISTRY_IMAGE_PULL_DOCKER_CONFIG_JSON}" > /tmp/kotsregistry.json - if [ "${REG_INCLUSTER_ENABLED}" = "1" ]; then + if [ "${REGISTRY_INCLUSTER_ENABLED}" = "1" ]; then echo "Gitpod: Add the local registry secret to the in-cluster registry secret" # Get the in-cluster registry secret @@ -116,18 +116,18 @@ EOF echo "Gitpod: append the container-registry secret" echo "---" >> "${GITPOD_OBJECTS}/templates/gitpod.yaml" - kubectl create secret docker-registry "${REG_EXTERNAL_CERTIFICATE_NAME}" \ + kubectl create secret docker-registry "${REGISTRY_EXTERNAL_CERTIFICATE_NAME}" \ --namespace "${NAMESPACE}" \ --from-file=.dockerconfigjson=/tmp/container-registry-secret \ -o yaml --dry-run=client >> "${GITPOD_OBJECTS}/templates/gitpod.yaml" fi - if [ "${REG_DOCKER_CONFIG_ENABLED}" = "1" ]; + if [ "${REGISTRY_DOCKER_CONFIG_ENABLED}" = "1" ]; then # Work out the registry secret to use - if [ "${REG_INCLUSTER_ENABLED}" = "0" ]; + if [ "${REGISTRY_INCLUSTER_ENABLED}" = "0" ]; then - export REGISTRY_SECRET_NAME="${REG_EXTERNAL_CERTIFICATE_NAME}" + export REGISTRY_SECRET_NAME="${REGISTRY_EXTERNAL_CERTIFICATE_NAME}" else export REGISTRY_SECRET_NAME="builtin-registry-auth" fi diff --git a/install/kots/manifests/gitpod-installation-status.yaml b/install/kots/manifests/gitpod-installation-status.yaml index 2e85e86e26f747..9786ad290d1347 100644 --- a/install/kots/manifests/gitpod-installation-status.yaml +++ b/install/kots/manifests/gitpod-installation-status.yaml @@ -30,7 +30,7 @@ spec: containers: - name: installation-status # This will normally be the release tag - image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-kots-config-validate.7" + image: "eu.gcr.io/gitpod-core-dev/build/installer:tar-installer-env-refactor.2" envFrom: - configMapRef: name: gitpod-kots-config diff --git a/install/kots/manifests/gitpod-installer-job.yaml b/install/kots/manifests/gitpod-installer-job.yaml index 9b7c6e4131c997..64ae296e260973 100644 --- a/install/kots/manifests/gitpod-installer-job.yaml +++ b/install/kots/manifests/gitpod-installer-job.yaml @@ -39,7 +39,7 @@ spec: containers: - name: installer # This will normally be the release tag - image: "eu.gcr.io/gitpod-core-dev/build/installer:sje-kots-config-validate.7" + image: "eu.gcr.io/gitpod-core-dev/build/installer:tar-installer-env-refactor.2" volumeMounts: - mountPath: /mnt/node0 name: node-fs0 @@ -47,7 +47,7 @@ spec: env: - name: MOUNT_PATH value: /mnt/node0 - - name: REG_DOCKER_CONFIG_JSON + - name: REGISTRY_DOCKER_CONFIG_JSON valueFrom: secretKeyRef: name: custom-registry-credentials diff --git a/install/kots/manifests/gitpod-kots-config.yaml b/install/kots/manifests/gitpod-kots-config.yaml index b0f1f7d5e4b19f..348e1c04a97e5c 100644 --- a/install/kots/manifests/gitpod-kots-config.yaml +++ b/install/kots/manifests/gitpod-kots-config.yaml @@ -40,15 +40,15 @@ data: IMAGE_PULL_SECRET_NAME: repl{{ ImagePullSecretName | quote }} # Registry settings - REG_INCLUSTER_ENABLED: repl{{ ConfigOption "reg_incluster" | quote }} - REG_URL: repl{{ ConfigOption "reg_url" | quote }} - REG_INCLUSTER_STORAGE: repl{{ ConfigOption "reg_incluster_storage" | quote }} - REG_INCLUSTER_STORAGE_S3_REGION: repl{{ ConfigOption "reg_incluster_storage_s3_region" | quote }} - REG_INCLUSTER_STORAGE_S3_ENDPOINT: repl{{ ConfigOption "reg_incluster_storage_s3_endpoint" | quote }} - REG_INCLUSTER_STORAGE_S3_BUCKETNAME: repl{{ ConfigOption "reg_incluster_storage_s3_bucketname" | quote }} - REG_INCLUSTER_STORAGE_S3_CERTIFICATE_NAME: container-registry-s3-backend - REG_DOCKER_CONFIG_ENABLED: repl{{ ConfigOption "reg_docker_config_enable" | quote }} - REG_EXTERNAL_CERTIFICATE_NAME: container-registry + REGISTRY_INCLUSTER_ENABLED: repl{{ ConfigOption "reg_incluster" | quote }} + REGISTRY_URL: repl{{ ConfigOption "reg_url" | quote }} + REGISTRY_INCLUSTER_STORAGE: repl{{ ConfigOption "reg_incluster_storage" | quote }} + REGISTRY_INCLUSTER_STORAGE_S3_REGION: repl{{ ConfigOption "reg_incluster_storage_s3_region" | quote }} + REGISTRY_INCLUSTER_STORAGE_S3_ENDPOINT: repl{{ ConfigOption "reg_incluster_storage_s3_endpoint" | quote }} + REGISTRY_INCLUSTER_STORAGE_S3_BUCKET_NAME: repl{{ ConfigOption "reg_incluster_storage_s3_bucketname" | quote }} + REGISTRY_INCLUSTER_STORAGE_S3_CERTIFICATE_NAME: container-registry-s3-backend + REGISTRY_DOCKER_CONFIG_ENABLED: repl{{ ConfigOption "reg_docker_config_enable" | quote }} + REGISTRY_EXTERNAL_CERTIFICATE_NAME: container-registry # Storage settings STORE_PROVIDER: repl{{ ConfigOption "store_provider" | quote }} @@ -72,7 +72,7 @@ data: # Advanced settings ADVANCED_MODE_ENABLED: repl{{ ConfigOption "advanced_mode_enabled" | quote }} - COMPONENT_PROXY_SERVICE_SERVICETYPE: repl{{ ConfigOption "component_proxy_service_serviceType" | quote }} + COMPONENT_PROXY_SERVICE_TYPE: repl{{ ConfigOption "component_proxy_service_serviceType" | quote }} CUSTOMIZATION_PATCH_ENABLED: repl{{ ConfigOptionNotEquals "customization_patch" "" | quote }} # Use comparison not value # Customizations