diff --git a/Dockerfile b/Dockerfile index 943f92a..50436b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:alpine3.8 AS builder +FROM golang:alpine3.11 AS builder # Copy source into builder ADD . /src @@ -8,12 +8,11 @@ RUN cd /src && \ go build -o example-app # Build the final image -FROM alpine:3.8 as final +FROM alpine:3.11 as final # Install the cloudposse alpine repository ADD https://apk.cloudposse.com/ops@cloudposse.com.rsa.pub /etc/apk/keys/ -RUN echo "@cloudposse https://apk.cloudposse.com/3.8/vendor" >> /etc/apk/repositories -RUN apk add --update bash variant@cloudposse +RUN echo "@cloudposse https://apk.cloudposse.com/3.11/vendor" >> /etc/apk/repositories # Expose port of the app EXPOSE 8080 diff --git a/README.md b/README.md index d1b4d03..95c20d5 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Example application for Codefresh CI/CD demonstrations. ### Codefresh Pipelines -1. Unlimited Staging Pipelines (pull-request, destroy) +1. Unlimited Staging Pipelines (preview, destroy) 2. Release Pipeline 3. Deploy Pipeline diff --git a/codefresh/build.yaml b/codefresh/build.yaml index f2bb7d5..b024d46 100644 --- a/codefresh/build.yaml +++ b/codefresh/build.yaml @@ -4,6 +4,7 @@ stages: - Prepare - Build - Push + - Deploy steps: main_clone: @@ -20,7 +21,7 @@ steps: stage: Build type: build description: Build image - image_name: ${{CF_REPO_NAME}} + image_name: ${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}} dockerfile: Dockerfile push_image_commit: @@ -28,5 +29,19 @@ steps: stage: Push type: push candidate: ${{build_image}} + registry: dockerhub tags: - - "${{CF_REVISION}}" \ No newline at end of file + - "${{CF_REVISION}}" + + deploy_master: + title: Deploying to Master + stage: "Deploy" + image: 'codefresh/cli:latest' + environment: + STAGE: master + commands: + - codefresh run ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}/deploy-${{STAGE}} -d -b=${{CF_BRANCH}} -v CF_RELEASE_TAG=${{CF_REVISION}} -v CF_PRERELEASE_FLAG=${{CF_PRERELEASE_FLAG}} -v STAGE=${{STAGE}} + when: + branch: + only: + - master \ No newline at end of file diff --git a/codefresh/deploy.yaml b/codefresh/deploy.yaml index 833665a..2427d2c 100644 --- a/codefresh/deploy.yaml +++ b/codefresh/deploy.yaml @@ -13,12 +13,10 @@ steps: - cf_export NAMESPACE=${{STAGE}} - cf_export IMAGE_NAME=${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}} - cf_export IMAGE_TAG=${{CF_RELEASE_TAG}} - - cf_export GATEWAY_HOST=example.${{BASE_HOST}} - - ask_for_permission: - type: pending-approval - title: Deploy release? - stage: Prepare + - cf_export APP_SCHEME=http + - cf_export APP_HOST=${{STAGE}}.${{CF_REPO_NAME}}.${{BASE_HOST}} + - cf_export COLOR=blue + - cf_export CF_BUILD_DATE_TIME=$(date +"%Y-%m-%d/%H:%M:%S" -d @$((${{CF_BUILD_TIMESTAMP}}/1000))) wait: title: Wait @@ -34,18 +32,17 @@ steps: deploy_helmfile: title: "Deploy with helmfile" stage: "Deploy" - image: "${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}}:${{CF_REVISION}}" + image: "${{IMAGE_NAME}}:${{IMAGE_TAG}}" working_directory: /deploy/ + environment: + - RELEASE_NAME=${{CF_REPO_NAME}} commands: # Announce the release version - - "echo 'Preparing to deploy ${{CF_REPO_NAME}}:${{CF_RELEASE_TAG}}'" - # Deploy chart to cluster - - "/deploy/ctl --namespace=${{NAMESPACE}} blue-green" - when: - steps: - - name: ask_for_permission - on: - - approved + - "echo 'Preparing to deploy ${{IMAGE_NAME}}:${{IMAGE_TAG}}'" + - "apk add --update curl make bash git kubectl@cloudposse helm@cloudposse=3.1.3-r0 helmfile@cloudposse" + - "kubectl config use-context ${{KUBE_CONTEXT}}" + # Deploy chart to cluster in a dedicated namespace + - "helmfile --namespace ${{NAMESPACE}} --selector preview=true sync" send_slack_notification: title: Send notification to Slack channel @@ -54,6 +51,38 @@ steps: working_directory: /build-harness environment: - PIPELINE_ENV=${{STAGE}} + - CHART_NAME=monochart + - GIT_COMMIT_SHORT=${{CF_SHORT_REVISION}} + - GIT_COMMIT_URL=${{CF_COMMIT_URL}} + - GIT_COMMIT_MESSAGE=${{CF_COMMIT_MESSAGE}} + - GIT_COMMIT_AUTHOR=${{CF_COMMIT_AUTHOR}} + - GIT_BRANCH_TAG=${{CF_BRANCH_TAG_NORMALIZED}} commands: - - make codefresh/notify/slack/deploy/webapp + - make codefresh/notify/slack/deploy/webapp GIT_COMMIT_TIMESTAMP=$((${{CF_BUILD_TIMESTAMP}}/1000)) + + set_github_deployment_status_to_success: + title: Set GitHub deployment status to "success" + stage: Deploy + image: cloudposse/github-status-updater + environment: + - GITHUB_ACTION=update_state + - GITHUB_TOKEN=${{GITHUB_TOKEN}} + - GITHUB_OWNER=${{CF_REPO_OWNER}} + - GITHUB_REPO=${{CF_REPO_NAME}} + - GITHUB_REF=${{CF_REVISION}} + - GITHUB_CONTEXT=${{STAGE}}/env + - GITHUB_STATE=success + - GITHUB_DESCRIPTION=Deployed to ${{NAMESPACE}} by @${{CF_BUILD_INITIATOR}} + - GITHUB_TARGET_URL=${{APP_SCHEME}}://${{APP_HOST}}/dashboard +add_url_to_comment_on_commit: + title: Comment on commit with the deployed URL + stage: Deploy + image: cloudposse/github-commenter + environment: + - GITHUB_TOKEN=${{GITHUB_TOKEN}} + - GITHUB_OWNER=${{CF_REPO_OWNER}} + - GITHUB_REPO=${{CF_REPO_NAME}} + - GITHUB_COMMENT_TYPE=commit + - GITHUB_COMMIT_SHA=${{CF_SHORT_REVISION}} + - 'GITHUB_COMMENT=Version ${{CF_SHORT_REVISION}} deployed by @${{CF_BUILD_INITIATOR}} to the [`${{NAMESPACE}}`](${{APP_SCHEME}}://${{APP_HOST}}/dashboard) namespace on `${{STAGE}}` at ${{CF_BUILD_DATE_TIME}}' \ No newline at end of file diff --git a/codefresh/destroy.yaml b/codefresh/destroy.yaml index ce6d558..df30ffb 100644 --- a/codefresh/destroy.yaml +++ b/codefresh/destroy.yaml @@ -9,7 +9,7 @@ steps: stage: Destroy image: codefresh/cli:latest commands: - - codefresh get builds --pipeline=destroy --pipeline=pull-request --branch=${{CF_BRANCH}} --status running --limit 1000 -o json | jq --arg id ${{CF_BUILD_ID}} -ser 'flatten|.[-1].id==$id' + - codefresh get builds --pipeline=destroy --pipeline=preview --branch=${{CF_BRANCH}} --status running --limit 1000 -o json | jq --arg id ${{CF_BUILD_ID}} -ser 'flatten|.[-1].id==$id' retry: maxAttempts: 10 delay: 20 @@ -21,20 +21,40 @@ steps: validatePRAction: "'${{CF_PULL_REQUEST_ACTION}}' == 'closed'" destroy: - title: Destroy namespace + title: Destroy Preview Environment stage: Destroy - image: cloudposse/build-harness:${{BUILD_HARNESS_VERSION}} - working_directory: /build-harness/ + image: "${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}}:${{CF_REVISION}}" + working_directory: /deploy/ environment: - NAMESPACE=pr-${{CF_PULL_REQUEST_NUMBER}}-${{CF_REPO_NAME}} + - RELEASE_NAME=${{CF_REPO_NAME}} + - COLOR=blue commands: - - "apk add kubectl" + - "apk add kubectl@cloudposse helm@cloudposse=3.1.3-r0 helmfile@cloudposse" - "kubectl config use-context ${{KUBE_CONTEXT}}" - - "make helm/delete/namespace" - - "make helm/delete/namespace/empty" + - "helmfile --namespace ${NAMESPACE} --selector preview=true destroy" when: condition: any: deployLabel: "match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == false" validatePRAction: "'${{CF_PULL_REQUEST_ACTION}}' == 'closed'" + set_github_destroy_status_to_success: + title: Set GitHub destroy status to "success" + stage: Destroy + image: cloudposse/github-status-updater + environment: + - GITHUB_ACTION=update_state + - GITHUB_TOKEN=${{GITHUB_TOKEN}} + - GITHUB_OWNER=${{CF_REPO_OWNER}} + - GITHUB_REPO=${{CF_REPO_NAME}} + - GITHUB_REF=${{CF_REVISION}} + - GITHUB_CONTEXT=preview/env + - GITHUB_STATE=success + - GITHUB_DESCRIPTION=Destroyed by @${{CF_BUILD_INITIATOR}} + - GITHUB_TARGET_URL=${{CF_BUILD_URL}} + when: + condition: + any: + deployLabel: "match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == false" + validatePRAction: "'${{CF_PULL_REQUEST_ACTION}}' == 'closed'" \ No newline at end of file diff --git a/codefresh/pull-request.yaml b/codefresh/preview.yaml similarity index 72% rename from codefresh/pull-request.yaml rename to codefresh/preview.yaml index 080d1f9..d00fe96 100644 --- a/codefresh/pull-request.yaml +++ b/codefresh/preview.yaml @@ -21,16 +21,20 @@ steps: stage: Prepare image: alpine commands: + - cf_export COLOR=blue + - cf_export STAGE=preview - cf_export GIT_BRANCH=${{CF_BRANCH}} - cf_export PROJECT=${{CF_REPO_NAME}} - cf_export APP_NAME=${{CF_REPO_NAME}} - cf_export CHART_NAME=monochart - cf_export PIPELINE_ENV=integration - cf_export NAMESPACE=pr-${{CF_PULL_REQUEST_NUMBER}}-${{CF_REPO_NAME}} - - cf_export RELEASE_NAME=pr-${{CF_PULL_REQUEST_NUMBER}}-${{CF_REPO_NAME}} + - cf_export RELEASE_NAME=${{CF_REPO_NAME}} + - cf_export APP_SCHEME=http - cf_export APP_HOST=pr-${{CF_PULL_REQUEST_NUMBER}}.${{CF_REPO_NAME}}.${{BASE_HOST}} - cf_export IMAGE_NAME=${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}} - cf_export IMAGE_TAG=${{CF_REVISION}} + - cf_export CF_BUILD_DATE_TIME=$(date +"%Y-%m-%d/%H:%M:%S" -d @$((${{CF_BUILD_TIMESTAMP}}/1000))) build: type: parallel @@ -40,7 +44,7 @@ steps: title: Build image type: build description: Build app - image_name: ${{CF_REPO_NAME}} + image_name: ${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}} tag: ${{CF_SHORT_REVISION}} dockerfile: Dockerfile no_cache: false @@ -91,10 +95,10 @@ steps: - GITHUB_OWNER=${{CF_REPO_OWNER}} - GITHUB_REPO=${{CF_REPO_NAME}} - GITHUB_REF=${{CF_REVISION}} - - GITHUB_CONTEXT=Staging Environment + - GITHUB_CONTEXT=${{STAGE}}/env - GITHUB_STATE=pending - GITHUB_DESCRIPTION=Deploying changes to ${{NAMESPACE}} namespace - - GITHUB_TARGET_URL=http://${{APP_HOST}} + - GITHUB_TARGET_URL=${{APP_SCHEME}}://${{APP_HOST}} when: condition: all: @@ -105,6 +109,7 @@ steps: title: Push image with commit tag stage: Deploy type: push + registry: dockerhub candidate: ${{build_image}} tags: - "${{CF_REVISION}}" @@ -114,7 +119,7 @@ steps: stage: Deploy image: codefresh/cli:latest commands: - - codefresh get builds --pipeline=destroy --pipeline=pull-request --branch=${{CF_BRANCH}} --status running --limit 1000 -o json | jq --arg id ${{CF_BUILD_ID}} -ser 'flatten|.[-1].id==$id' + - codefresh get builds --pipeline=destroy --pipeline=preview --branch=${{CF_BRANCH}} --status running --limit 1000 -o json | jq --arg id ${{CF_BUILD_ID}} -ser 'flatten|.[-1].id==$id' retry: maxAttempts: 10 delay: 20 @@ -132,8 +137,11 @@ steps: commands: # Announce the release version - "echo 'Preparing to deploy ${{CF_REPO_NAME}}:${{CF_RELEASE_TAG}}'" + # Downgrade to helm 3.1.3: https://github.com/helm/helm/issues/7956 + - "apk add --update curl make bash git kubectl@cloudposse helm@cloudposse=3.1.3-r0 helmfile@cloudposse" + - "kubectl config use-context ${{KUBE_CONTEXT}}" # Deploy chart to cluster in a dedicated namespace - - "/deploy/ctl --namespace=${{NAMESPACE}} rolling" + - "helmfile --namespace ${{NAMESPACE}} --selector preview=true sync" when: condition: any: @@ -149,10 +157,10 @@ steps: - GITHUB_OWNER=${{CF_REPO_OWNER}} - GITHUB_REPO=${{CF_REPO_NAME}} - GITHUB_REF=${{CF_REVISION}} - - GITHUB_CONTEXT=Staging Environment + - GITHUB_CONTEXT=${{STAGE}}/env - GITHUB_STATE=success - - GITHUB_DESCRIPTION=Deployed to ${{NAMESPACE}} namespace - - GITHUB_TARGET_URL=http://${{APP_HOST}} + - GITHUB_DESCRIPTION=Deployed to ${{NAMESPACE}} by @${{CF_BUILD_INITIATOR}} + - GITHUB_TARGET_URL=${{APP_SCHEME}}://${{APP_HOST}}/dashboard when: condition: all: @@ -177,3 +185,18 @@ steps: any: deployLabel: "match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true" + add_url_to_comment_on_commit: + title: Comment on commit with the deployed URL + stage: Deploy + image: cloudposse/github-commenter + environment: + - GITHUB_TOKEN=${{GITHUB_TOKEN}} + - GITHUB_OWNER=${{CF_REPO_OWNER}} + - GITHUB_REPO=${{CF_REPO_NAME}} + - GITHUB_COMMENT_TYPE=commit + - GITHUB_COMMIT_SHA=${{CF_SHORT_REVISION}} + - 'GITHUB_COMMENT=Version ${{CF_SHORT_REVISION}} deployed by @${{CF_BUILD_INITIATOR}} to the [`${{NAMESPACE}}`](${{APP_SCHEME}}://${{APP_HOST}}/dashboard) namespace on `${{STAGE}}` at ${{CF_BUILD_DATE_TIME}}
![:thumbsup:](https://cloudposse.com/urand/familyguy.gif)
' + when: + condition: + all: + deployLabel: "match('${{CF_PULL_REQUEST_LABELS}}', 'deploy', false) == true" \ No newline at end of file diff --git a/codefresh/release.yaml b/codefresh/release.yaml index 0ebba89..779b6db 100644 --- a/codefresh/release.yaml +++ b/codefresh/release.yaml @@ -1,21 +1,20 @@ version: '1.0' stages: - - Prepare - Promote - - Deploy + - Staging + - Production steps: main_clone: - title: "Create Context" - stage: "Prepare" + title: "Prepare Release" + stage: "Promote" image: alpine commands: - # Extract the postfix of a semver (e.g. 0.0.0-stage => stage) - - cf_export STAGE=$(echo ${{CF_RELEASE_TAG}} | sed -E 's/^[^-]+-?//') + - echo "Preparing Deployment of ${{CF_RELEASE_TAG}} (${{CF_REVISION}})" pull_image_sha: - title: Pull image with commit sha + title: Pull image with commit SHA stage: "Promote" image: "${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}}:${{CF_REVISION}}" retry: @@ -23,24 +22,52 @@ steps: delay: 20 exponentialFactor: 1.1 commands: - - "true" + - "true" push_image_tag: title: Push image with release tag stage: "Promote" type: push - image_name: ${{CF_REPO_NAME}} + image_name: ${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}} candidate: "${{CF_DOCKER_REPO_URL}}/${{CF_REPO_NAME}}:${{CF_REVISION}}" + registry: dockerhub tags: - - "${{CF_RELEASE_TAG}}" + - "${{CF_RELEASE_TAG}}" + + deploy_staging_confirmation: + type: pending-approval + title: Deploy Release to Staging? + stage: Staging + + deploy_staging: + title: Releasing to Staging + stage: "Staging" + image: 'codefresh/cli:latest' + environment: + - STAGE=staging + commands: + - codefresh run ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}/deploy-${STAGE} -b=${{CF_BRANCH}} -v CF_RELEASE_TAG=${{CF_RELEASE_TAG}} -v CF_PRERELEASE_FLAG=${{CF_PRERELEASE_FLAG}} -v CF_SHORT_REVISION="Release ${{CF_RELEASE_TAG}}" -v CF_COMMIT_AUTHOR=${{CF_COMMIT_AUTHOR}} -v CF_BRANCH_TAG_NORMALIZED=${{CF_BRANCH_TAG_NORMALIZED}} -v STAGE=${STAGE} + when: + steps: + - name: deploy_staging_confirmation + on: + - approved - deploy: - title: Deploy Release - stage: "Deploy" + deploy_production_confirmation: + type: pending-approval + title: Deploy Release to Production? + stage: Production + + deploy_production: + title: Releasing to Production + stage: "Production" image: 'codefresh/cli:latest' + environment: + - STAGE=prod commands: - - codefresh run ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}/deploy-${{STAGE}} -d -b=${{CF_BRANCH}} -v CF_RELEASE_TAG=${{CF_RELEASE_TAG}} -v CF_PRERELEASE_FLAG=${{CF_PRERELEASE_FLAG}} -v STAGE=${{STAGE}} + - codefresh run ${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}/deploy-${STAGE} -b=${{CF_BRANCH}} -v CF_RELEASE_TAG=${{CF_RELEASE_TAG}} -v CF_PRERELEASE_FLAG=${{CF_PRERELEASE_FLAG}} -v CF_SHORT_REVISION=${{CF_SHORT_REVISION}} -v CF_COMMIT_URL=${{CF_COMMIT_URL}} -v CF_COMMIT_MESSAGE="Release ${{CF_RELEASE_TAG}}" -v CF_COMMIT_AUTHOR=${{CF_COMMIT_AUTHOR}} -v CF_BRANCH_TAG_NORMALIZED=${{CF_BRANCH_TAG_NORMALIZED}} -v STAGE=${STAGE} when: - condition: - all: - stageDefined: "'${{STAGE}}' != ''" + steps: + - name: deploy_production_confirmation + on: + - approved \ No newline at end of file diff --git a/deploy/.ctlenv b/deploy/.ctlenv deleted file mode 100644 index 9001211..0000000 --- a/deploy/.ctlenv +++ /dev/null @@ -1 +0,0 @@ -dev \ No newline at end of file diff --git a/deploy/ctl b/deploy/ctl deleted file mode 100755 index 597472d..0000000 --- a/deploy/ctl +++ /dev/null @@ -1,99 +0,0 @@ -#!/usr/bin/env variant -# vim:set ft=yaml - -parameters: -- name: config - default: .color - description: "Config file that keeps track of the current color" - -- name: namespace - default: "default" - description: "Kubernetes namespace" - -tasks: - - # https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-ip-and-ports-when-using-an-external-load-balancer - istio-ingress: - description: Output the FQHN of the Istio Ingress Gateway - script: | - kubectl --namespace istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' - - # https://istio.io/docs/setup/kubernetes/quick-start/ - istio-injection: - description: Enable Istio Sidecar Injection for a namespace - script: | - kubectl label namespace {{ get "namespace" }} istio-injection=enabled --overwrite=true - - use-context: - description: "Configure kube-context" - script: | - kubectl config use-context ${KUBE_CONTEXT} - - deps: - description: "Install alpine dependencies" - script: | - ! which apk >/dev/null || apk add --update curl make bash git kubectl@cloudposse helm@cloudposse helmfile@cloudposse - helm init --client-only - - color: - description: "Lookup the current color" - script: | - config=${CF_VOLUME_PATH:-.}/{{ get "config" }} - if [ -f ${config} ]; then - cat ${config} - else - echo "Initializing as blue" >&2 - echo "blue" | tee ${config} - fi - - rolling: - description: "Trigger a standard rolling deployment without istio" - - parameters: - - name: color - type: string - default: "black" - description: "Selected color to deploy" - - steps: - - task: deps - - task: use-context - - script: | - export COLOR={{ get "color" }} - echo "Updating [${KUBE_CONTEXT}] context {{ get "namespace" }} namespace with color=${COLOR}" - # Deploy the app and update istio virtual service - helmfile --namespace {{ get "namespace" }} --selector pull-request=true sync - - blue-green: - description: "Trigger a blue-green deployment" - parameters: - - name: color - type: string - description: "Selected color to deploy" - - - name: blue - type: string - default: green - description: "Flip blue color to this color" - - - name: green - type: string - default: blue - description: "Flip green color to this color" - - steps: - - task: deps - - task: use-context - - task: istio-injection - - script: | - config=${CF_VOLUME_PATH:-.}/{{ get "config" }} - cur_color={{ get "color" }} - new_color={{ get "color" | get }} - echo "Config file is ${config}" - echo "Updating [${KUBE_CONTEXT}] context {{ get "namespace" }} namespace: $cur_color => $new_color" - export COLOR=$new_color - export APP_HOST=${COLOR}.example.${BASE_HOST} - export RELEASE_NAME=example-${COLOR} - # Deploy the app and update istio virtual service - helmfile --namespace {{ get "namespace" }} sync - echo "$new_color" > ${config} diff --git a/deploy/helmfile.yaml b/deploy/helmfile.yaml index df9fb27..6386510 100644 --- a/deploy/helmfile.yaml +++ b/deploy/helmfile.yaml @@ -1,5 +1,5 @@ # Ordered list of releases. helmfiles: - - "releases/pull-secret.yaml" +# - "releases/pull-secret.yaml" - "releases/app.yaml" - "releases/istio.yaml" diff --git a/deploy/releases/app.yaml b/deploy/releases/app.yaml index 9564685..2ca783f 100644 --- a/deploy/releases/app.yaml +++ b/deploy/releases/app.yaml @@ -11,9 +11,9 @@ releases: - name: '{{ requiredEnv "RELEASE_NAME" }}' labels: color: "{{ requiredEnv "COLOR" }}" - pull-request: "true" + preview: "true" chart: "cloudposse-incubator/monochart" - version: "0.12.0" + version: "0.22.0" wait: true force: true recreatePods: false @@ -23,8 +23,8 @@ releases: repository: '{{ env "IMAGE_NAME" | default "cloudposse/example-app" }}' tag: '{{ env "IMAGE_TAG" | default "0.1.0" }}' pullPolicy: Always - pullSecrets: - - "{{ requiredEnv "RELEASE_NAME" }}-pull-secret-dockercfg " + #pullSecrets: + # - "{{ requiredEnv "RELEASE_NAME" }}-pull-secret-dockercfg " replicaCount: 5 # Deployment configuration deployment: @@ -57,18 +57,15 @@ releases: ingress: default: enabled: true - labels: - dns: "route53" annotations: kubernetes.io/ingress.class: nginx kubernetes.io/tls-acme: "true" - external-dns.alpha.kubernetes.io/target: '{{ requiredEnv "NGINX_INGRESS_HOSTNAME" }}' external-dns.alpha.kubernetes.io/ttl: "60" hosts: ### Required: APP_HOST; '{{ env "APP_HOST" }}': / tls: - ### Optional: ATLANTIS_TLS_SECRET_NAME; + ### Optional: APP_TLS_SECRET_NAME; - secretName: '{{ env "APP_TLS_SECRET_NAME" | default (requiredEnv "COLOR" | printf "example-%s-server-tls") }}' hosts: ### Required: APP_HOST; diff --git a/deploy/releases/pull-secret.yaml b/deploy/releases/pull-secret.yaml index 3318e49..ba19ac0 100644 --- a/deploy/releases/pull-secret.yaml +++ b/deploy/releases/pull-secret.yaml @@ -33,7 +33,7 @@ releases: labels: chart: "dockercfg" component: "secrets" - pull-request: "true" + preview: "true" values: - image: