Skip to content

Commit

Permalink
Updat K8s deployments to configure DOC_ENVIRONMENT (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
ccheetham authored May 27, 2022
1 parent 0bd5333 commit 86f6dcb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ stages:
-f kubernetes
-v image_tag=$(Build.BuildId)
-v hostname=docs-dev.steeltoe.io
-v doc_environment=Staging
--output-files manifests/staging
- task: ShellScript@2
displayName: Generate Production Manifest
Expand All @@ -49,6 +50,7 @@ stages:
-v image_tag=$(Build.BuildId)
-v replica_count=2
-v hostname=docs.steeltoe.io
-v doc_environment=Production
--output-files manifests/production
- task: PublishPipelineArtifact@1
displayName: Publish Manifests
Expand Down
3 changes: 2 additions & 1 deletion docker/docker-entrypoint.d/70-documentation-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ else
log "using $docenv configuration"
docenv_file=$docenv_home/$docenv.env
if [[ ! -f $docenv_file ]]; then
die "env file not found: $docenv_file"
log "env file not found: $docenv_file"
return
fi
source $docenv_file
fi
Expand Down
1 change: 1 addition & 0 deletions kubernetes/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ container_memory: 128Mi
container_cpu: 500m
service_port: 80
replica_count: 1
doc_environment: ""
hostname: ""
tls_secret: documentation-tls
3 changes: 3 additions & 0 deletions kubernetes/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ spec:
image: #@ "{}:{}".format(data.values.image_name, data.values.image_tag)
ports:
- containerPort: #@ int(data.values.container_port)
env:
- name: DOC_ENVIRONMENT
value: #@ data.values.doc_environment
resources:
limits:
memory: #@ data.values.container_memory
Expand Down

0 comments on commit 86f6dcb

Please sign in to comment.