├── go.mod ├── settings.ini ├── .gitignore ├── Dockerfile ├── chart ├── sample-app │ ├── templates │ │ ├── service.yaml │ │ ├── tests │ │ │ └── test-connection.yaml │ │ ├── settings-cm.yml │ │ ├── deployment.yaml │ │ ├── NOTES.txt │ │ └── _helpers.tpl │ ├── .helmignore │ └── Chart.yaml ├── values-qa.yaml ├── values-prod.yaml └── values-staging.yaml ├── pipelines ├── 0_build_only.yml ├── 4b_production.yml ├── 4a_staging.yml ├── 3_approval.yml ├── 1_basic_deploy.yml └── 2_environment_board.yml ├── README.md ├── go.sum └── simple-web-server.go /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/codefresh-contrib/helm-promotion-sample-app 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/smartystreets/goconvey v1.6.4 // indirect 7 | gopkg.in/ini.v1 v1.62.0 8 | ) 9 | -------------------------------------------------------------------------------- /settings.ini: -------------------------------------------------------------------------------- 1 | # possible values : production, development, staging, qa 2 | app_mode = development 3 | 4 | [security] 5 | # Path to SSL certificates 6 | certificates = /etc/ssl/dev 7 | 8 | [paypal] 9 | paypal_url = https://development.paypal.example.com 10 | 11 | [mysql] 12 | db_user = devuser 13 | db_password = devpassword 14 | 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | bin 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.15.1-alpine3.12 AS build-env 2 | 3 | WORKDIR /tmp/simple-go-app 4 | 5 | COPY . . 6 | 7 | RUN CGO_ENABLED=0 GOOS=linux go build 8 | 9 | FROM scratch 10 | COPY --from=build-env /tmp/simple-go-app/helm-promotion-sample-app /app/helm-promotion-sample-app 11 | 12 | COPY settings.ini /config/settings.ini 13 | 14 | 15 | EXPOSE 8080 16 | CMD ["/app/helm-promotion-sample-app"] 17 | -------------------------------------------------------------------------------- /chart/sample-app/templates/service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: {{ include "sample-app.fullname" . }} 5 | labels: 6 | {{- include "sample-app.labels" . | nindent 4 }} 7 | spec: 8 | type: {{ .Values.service.type }} 9 | ports: 10 | - port: {{ .Values.service.port }} 11 | targetPort: http 12 | protocol: TCP 13 | name: http 14 | selector: 15 | {{- include "sample-app.selectorLabels" . | nindent 4 }} 16 | -------------------------------------------------------------------------------- /chart/sample-app/.helmignore: -------------------------------------------------------------------------------- 1 | # Patterns to ignore when building packages. 2 | # This supports shell glob matching, relative path matching, and 3 | # negation (prefixed with !). Only one pattern per line. 4 | .DS_Store 5 | # Common VCS dirs 6 | .git/ 7 | .gitignore 8 | .bzr/ 9 | .bzrignore 10 | .hg/ 11 | .hgignore 12 | .svn/ 13 | # Common backup files 14 | *.swp 15 | *.bak 16 | *.tmp 17 | *.orig 18 | *~ 19 | # Various IDEs 20 | .project 21 | .idea/ 22 | *.tmproj 23 | .vscode/ 24 | -------------------------------------------------------------------------------- /chart/sample-app/templates/tests/test-connection.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Pod 3 | metadata: 4 | name: "{{ include "sample-app.fullname" . }}-test-connection" 5 | labels: 6 | {{- include "sample-app.labels" . | nindent 4 }} 7 | annotations: 8 | "helm.sh/hook": test 9 | spec: 10 | containers: 11 | - name: wget 12 | image: busybox 13 | command: ['wget'] 14 | args: ['{{ include "sample-app.fullname" . }}:{{ .Values.service.port }}'] 15 | restartPolicy: Never 16 | -------------------------------------------------------------------------------- /chart/sample-app/templates/settings-cm.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ConfigMap 3 | metadata: 4 | name: application-settings 5 | data: 6 | settings.ini: | 7 | # possible values : production, development, staging, qa 8 | app_mode = {{ .Values.appMode }} 9 | 10 | [security] 11 | # Path to SSL certificates 12 | certificates = {{ .Values.certificatePath }} 13 | 14 | [paypal] 15 | paypal_url = {{ .Values.paypalURLLocation }} 16 | 17 | [mysql] 18 | db_user = {{ .Values.databaseUser }} 19 | db_password = {{ .Values.databasePassword }} 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /pipelines/0_build_only.yml: -------------------------------------------------------------------------------- 1 | version: "1.0" 2 | stages: 3 | - "clone" 4 | - "build" 5 | - "deployment" 6 | 7 | steps: 8 | clone: 9 | title: "Cloning repository" 10 | type: "git-clone" 11 | repo: "codefresh-contrib/helm-promotion-sample-app" 12 | revision: '${{CF_REVISION}}' 13 | stage: "clone" 14 | 15 | build: 16 | title: "Building Docker image" 17 | type: "build" 18 | image_name: "kostiscodefresh/helm-promotion-app" 19 | working_directory: "${{clone}}" 20 | tags: 21 | - "latest" 22 | - '${{CF_SHORT_REVISION}}' 23 | dockerfile: "Dockerfile" 24 | stage: "build" 25 | registry: dockerhub 26 | -------------------------------------------------------------------------------- /chart/values-qa.yaml: -------------------------------------------------------------------------------- 1 | # Default values for sample-app. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: kostiscodefresh/helm-promotion-app 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "latest" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | service: 18 | type: LoadBalancer 19 | port: 80 20 | 21 | 22 | ## Application level settings 23 | appMode: qa 24 | certificatePath: /etc/ssl/qa 25 | paypalURLLocation: https://qa.paypal.example.com 26 | databaseUser: qa-user 27 | databasePassword: qa-password 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /chart/values-prod.yaml: -------------------------------------------------------------------------------- 1 | # Default values for sample-app. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 2 6 | 7 | image: 8 | repository: kostiscodefresh/helm-promotion-app 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "latest" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | service: 18 | type: LoadBalancer 19 | port: 80 20 | 21 | 22 | ## Application level settings 23 | appMode: production 24 | certificatePath: /etc/ssl/prod 25 | paypalURLLocation: https://prod.paypal.example.com 26 | databaseUser: prod-user 27 | databasePassword: prod-password 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /chart/values-staging.yaml: -------------------------------------------------------------------------------- 1 | # Default values for sample-app. 2 | # This is a YAML-formatted file. 3 | # Declare variables to be passed into your templates. 4 | 5 | replicaCount: 1 6 | 7 | image: 8 | repository: kostiscodefresh/helm-promotion-app 9 | pullPolicy: IfNotPresent 10 | # Overrides the image tag whose default is the chart appVersion. 11 | tag: "latest" 12 | 13 | imagePullSecrets: [] 14 | nameOverride: "" 15 | fullnameOverride: "" 16 | 17 | service: 18 | type: LoadBalancer 19 | port: 80 20 | 21 | 22 | ## Application level settings 23 | appMode: staging 24 | certificatePath: /etc/ssl/staging 25 | paypalURLLocation: https://staging.paypal.example.com 26 | databaseUser: staging-user 27 | databasePassword: staging-password 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Example of Helm application for multiple environments 2 | 3 | This is single application that has different configurations for 3 different environments 4 | 5 | * For the [QA](values-qa.yaml) environment 6 | * For the [Staging](values-staging.yaml) environment 7 | * For the [Production](values-prod.yaml) environment 8 | 9 | The repository also contains several Codefresh pipelines 10 | 11 | * [Build only pipeline](pipelines/0_build_only.yml) 12 | * [Basic deployment](pipelines/1_basic_deploy.yml) 13 | * [Environment Board](pipelines/2_environment_board.yml) 14 | * [Manual approval](pipelines/3_approval.yml) 15 | * [Staging deployment](pipelines/4a_staging.yml) 16 | * [Production deployment](pipelines/4b_production.yml) 17 | 18 | See the [documentation page](https://codefresh.io/docs/docs/ci-cd-guides/environment-deployments/) for more details. 19 | 20 | -------------------------------------------------------------------------------- /chart/sample-app/Chart.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v2 2 | name: sample-app 3 | description: A Helm chart for Kubernetes 4 | 5 | # A chart can be either an 'application' or a 'library' chart. 6 | # 7 | # Application charts are a collection of templates that can be packaged into versioned archives 8 | # to be deployed. 9 | # 10 | # Library charts provide useful utilities or functions for the chart developer. They're included as 11 | # a dependency of application charts to inject those utilities and functions into the rendering 12 | # pipeline. Library charts do not define any templates and therefore cannot be deployed. 13 | type: application 14 | 15 | # This is the chart version. This version number should be incremented each time you make changes 16 | # to the chart and its templates, including the app version. 17 | # Versions are expected to follow Semantic Versioning (https://semver.org/) 18 | version: 0.1.0 19 | 20 | # This is the version number of the application being deployed. This version number should be 21 | # incremented each time you make changes to the application. Versions are not expected to 22 | # follow Semantic Versioning. They should reflect the version the application is using. 23 | appVersion: 1.0.0 24 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 2 | github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= 3 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 4 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= 5 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 6 | github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= 7 | github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 8 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 9 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 10 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 11 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 12 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 13 | gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= 14 | gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 15 | -------------------------------------------------------------------------------- /pipelines/4b_production.yml: -------------------------------------------------------------------------------- 1 | version: "1.0" 2 | stages: 3 | - "clone" 4 | - "build" 5 | - "testing" 6 | - "prod" 7 | 8 | steps: 9 | clone: 10 | title: "Cloning repository" 11 | type: "git-clone" 12 | repo: "codefresh-contrib/helm-promotion-sample-app" 13 | revision: '${{CF_REVISION}}' 14 | stage: "clone" 15 | build_app_image: 16 | title: "Building Docker image" 17 | type: "build" 18 | image_name: "kostiscodefresh/helm-promotion-app" 19 | working_directory: "${{clone}}" 20 | tags: 21 | - "latest" 22 | - '${{CF_SHORT_REVISION}}' 23 | dockerfile: "Dockerfile" 24 | stage: "build" 25 | registry: dockerhub 26 | myTests: 27 | title: Integration Tests 28 | type: freestyle 29 | working_directory: "${{clone}}" 30 | stage: "testing" 31 | arguments: 32 | image: 'byrnedo/alpine-curl' 33 | commands: 34 | - "curl http://app:8080/health" 35 | services: 36 | composition: 37 | app: 38 | image: '${{build_app_image}}' 39 | ports: 40 | - 8080 41 | deployProd: 42 | title: Deploying to Production 43 | type: helm 44 | stage: prod 45 | working_directory: ./helm-promotion-sample-app 46 | arguments: 47 | action: install 48 | chart_name: ./chart/sample-app 49 | release_name: example-prod 50 | helm_version: 3.0.2 51 | kube_context: 'mydemoAkscluster@BizSpark Plus' 52 | namespace: production 53 | custom_value_files: 54 | - ./chart/values-prod.yaml -------------------------------------------------------------------------------- /chart/sample-app/templates/deployment.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: {{ include "sample-app.fullname" . }} 5 | labels: 6 | {{- include "sample-app.labels" . | nindent 4 }} 7 | spec: 8 | replicas: {{ .Values.replicaCount }} 9 | selector: 10 | matchLabels: 11 | {{- include "sample-app.selectorLabels" . | nindent 6 }} 12 | template: 13 | metadata: 14 | labels: 15 | {{- include "sample-app.selectorLabels" . | nindent 8 }} 16 | spec: 17 | {{- with .Values.imagePullSecrets }} 18 | imagePullSecrets: 19 | {{- toYaml . | nindent 8 }} 20 | {{- end }} 21 | 22 | containers: 23 | - name: {{ .Chart.Name }} 24 | securityContext: 25 | {{- toYaml .Values.securityContext | nindent 12 }} 26 | image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" 27 | imagePullPolicy: {{ .Values.image.pullPolicy }} 28 | ports: 29 | - name: http 30 | containerPort: 8080 31 | protocol: TCP 32 | volumeMounts: 33 | - name: config-volume 34 | mountPath: /config 35 | livenessProbe: 36 | httpGet: 37 | path: /health 38 | port: http 39 | readinessProbe: 40 | httpGet: 41 | path: /health 42 | port: http 43 | volumes: 44 | - name: config-volume 45 | configMap: 46 | name: application-settings 47 | 48 | -------------------------------------------------------------------------------- /pipelines/4a_staging.yml: -------------------------------------------------------------------------------- 1 | version: "1.0" 2 | stages: 3 | - "clone" 4 | - "validate" 5 | - "build" 6 | - "staging" 7 | 8 | steps: 9 | clone: 10 | title: "Cloning repository" 11 | type: "git-clone" 12 | repo: "codefresh-contrib/helm-promotion-sample-app" 13 | revision: '${{CF_REVISION}}' 14 | stage: "clone" 15 | prechecks: 16 | type: parallel 17 | stage: 'validate' 18 | steps: 19 | lint: 20 | title: Lint 21 | working_directory: "${{clone}}" 22 | image: golangci/golangci-lint:v1.33.0 23 | commands: 24 | - golangci-lint run -v . 25 | securityAnalysis: 26 | title: Security Scan 27 | working_directory: "${{clone}}" 28 | image: 'securego/gosec:v2.5.0' 29 | commands: 30 | - gosec ./... 31 | build: 32 | title: "Building Docker image" 33 | type: "build" 34 | image_name: "kostiscodefresh/helm-promotion-app" 35 | working_directory: "${{clone}}" 36 | tags: 37 | - "latest" 38 | - '${{CF_SHORT_REVISION}}' 39 | dockerfile: "Dockerfile" 40 | stage: "build" 41 | registry: dockerhub 42 | 43 | deployStaging: 44 | title: Deploying to Staging 45 | type: helm 46 | stage: staging 47 | working_directory: ./helm-promotion-sample-app 48 | arguments: 49 | action: install 50 | chart_name: ./chart/sample-app 51 | release_name: example-staging 52 | helm_version: 3.0.2 53 | kube_context: 'mydemoAkscluster@BizSpark Plus' 54 | namespace: staging 55 | custom_value_files: 56 | - ./chart/values-staging.yaml -------------------------------------------------------------------------------- /chart/sample-app/templates/NOTES.txt: -------------------------------------------------------------------------------- 1 | 1. Get the application URL by running these commands: 2 | {{- if contains "NodePort" .Values.service.type }} 3 | export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "sample-app.fullname" . }}) 4 | export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") 5 | echo http://$NODE_IP:$NODE_PORT 6 | {{- else if contains "LoadBalancer" .Values.service.type }} 7 | NOTE: It may take a few minutes for the LoadBalancer IP to be available. 8 | You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "sample-app.fullname" . }}' 9 | export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "sample-app.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") 10 | echo http://$SERVICE_IP:{{ .Values.service.port }} 11 | {{- else if contains "ClusterIP" .Values.service.type }} 12 | export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "sample-app.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") 13 | export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") 14 | echo "Visit http://127.0.0.1:8080 to use your application" 15 | kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT 16 | {{- end }} 17 | -------------------------------------------------------------------------------- /pipelines/3_approval.yml: -------------------------------------------------------------------------------- 1 | version: "1.0" 2 | stages: 3 | - "clone" 4 | - "build" 5 | - "staging" 6 | - "prod" 7 | 8 | steps: 9 | clone: 10 | title: "Cloning repository" 11 | type: "git-clone" 12 | repo: "codefresh-contrib/helm-promotion-sample-app" 13 | revision: '${{CF_REVISION}}' 14 | stage: "clone" 15 | 16 | build: 17 | title: "Building Docker image" 18 | type: "build" 19 | image_name: "kostiscodefresh/helm-promotion-app" 20 | working_directory: "${{clone}}" 21 | tags: 22 | - "latest" 23 | - '${{CF_SHORT_REVISION}}' 24 | dockerfile: "Dockerfile" 25 | stage: "build" 26 | registry: dockerhub 27 | deployStaging: 28 | title: Deploying to Staging 29 | type: helm 30 | stage: staging 31 | working_directory: ./helm-promotion-sample-app 32 | arguments: 33 | action: install 34 | chart_name: ./chart/sample-app 35 | release_name: example-staging 36 | helm_version: 3.0.2 37 | kube_context: 'mydemoAkscluster@BizSpark Plus' 38 | namespace: staging 39 | custom_value_files: 40 | - ./chart/values-staging.yaml 41 | askForPermission: 42 | type: pending-approval 43 | stage: prod 44 | title: Deploy to production? 45 | deployProd: 46 | title: Deploying to Production 47 | type: helm 48 | stage: prod 49 | working_directory: ./helm-promotion-sample-app 50 | arguments: 51 | action: install 52 | chart_name: ./chart/sample-app 53 | release_name: example-prod 54 | helm_version: 3.0.2 55 | kube_context: 'mydemoAkscluster@BizSpark Plus' 56 | namespace: production 57 | custom_value_files: 58 | - ./chart/values-prod.yaml -------------------------------------------------------------------------------- /pipelines/1_basic_deploy.yml: -------------------------------------------------------------------------------- 1 | version: "1.0" 2 | stages: 3 | - "clone" 4 | - "build" 5 | - "deployment" 6 | 7 | steps: 8 | clone: 9 | title: "Cloning repository" 10 | type: "git-clone" 11 | repo: "codefresh-contrib/helm-promotion-sample-app" 12 | revision: '${{CF_REVISION}}' 13 | stage: "clone" 14 | 15 | build: 16 | title: "Building Docker image" 17 | type: "build" 18 | image_name: "kostiscodefresh/helm-promotion-app" 19 | working_directory: "${{clone}}" 20 | tags: 21 | - "latest" 22 | - '${{CF_SHORT_REVISION}}' 23 | dockerfile: "Dockerfile" 24 | stage: "build" 25 | registry: dockerhub 26 | deployStaging: 27 | title: Deploying to Staging 28 | type: helm 29 | stage: deployment 30 | working_directory: ./helm-promotion-sample-app 31 | arguments: 32 | action: install 33 | chart_name: ./chart/sample-app 34 | release_name: example-staging 35 | helm_version: 3.0.2 36 | kube_context: 'mydemoAkscluster@BizSpark Plus' 37 | namespace: staging 38 | custom_value_files: 39 | - ./chart/values-staging.yaml 40 | when: 41 | branch: 42 | ignore: 43 | - master 44 | deployProd: 45 | title: Deploying to Production 46 | type: helm 47 | stage: deployment 48 | working_directory: ./helm-promotion-sample-app 49 | arguments: 50 | action: install 51 | chart_name: ./chart/sample-app 52 | release_name: example-prod 53 | helm_version: 3.0.2 54 | kube_context: 'mydemoAkscluster@BizSpark Plus' 55 | namespace: production 56 | custom_value_files: 57 | - ./chart/values-prod.yaml 58 | when: 59 | branch: 60 | only: 61 | - master -------------------------------------------------------------------------------- /simple-web-server.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | 7 | "gopkg.in/ini.v1" 8 | ) 9 | 10 | type configurationListHandler struct { 11 | appMode string 12 | certificatePath string 13 | paypalURL string 14 | dbUser string 15 | dbPassword string 16 | } 17 | 18 | func (h *configurationListHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { 19 | w.Header().Set("Content-Type", "text/html; charset=utf-8") 20 | fmt.Fprintf(w, "