Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare deployment for new Kubernetes setup #263

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions build/demo/chart/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@ dependencies:
- name: github-status-deployment-link
version: 0.0.1
repository: file://../dependencies/charts/github-status-deployment-link
- name: sync-secrets
version: 0.0.1
repository: file://../dependencies/charts/sync-secrets
1 change: 1 addition & 0 deletions build/demo/chart/templates/demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ metadata:
nginx.ingress.kubernetes.io/rewrite-target: {{ .Values.ingress.path }}
nginx.ingress.kubernetes.io/add-base-url: "true"
nginx.ingress.kubernetes.io/proxy-body-size: 2000m
cert-manager.io/cluster-issuer: "default"
spec:
rules:
- host: {{ .Values.ingress.host }}
Expand Down
14 changes: 6 additions & 8 deletions build/demo/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ metadata:
EOF

#==============================
echo "[INFO] Copy secrets"
echo "[INFO] Create dockerhub secret"

kubectl get secret "dockerhub" \
--namespace="lunar-system" --export -o yaml | kubectl apply --namespace="$deployment_namespace" -f -

kubectl get secret "${deployment_host}-tls" \
--namespace="lunar-system" --export -o yaml | kubectl apply --namespace="$deployment_namespace" -f -
kubectl -n ${deployment_namespace} create secret docker-registry dockerhub \
--docker-server="https://index.docker.io/v1/" \
--docker-username=$( vault kv get -field=value machineuser/DOCKER_USER ) \
--docker-password=$( vault kv get -field=value machineuser/DOCKER_PASS ) \
--dry-run -o yaml | kubectl apply -f -

#==============================
echo "[INFO] Create secret with required environment variables"
Expand Down Expand Up @@ -112,8 +112,6 @@ helm upgrade \
--set slack-notifications.github.ref="$git_revision" \
--set slack-notifications.ci.jobUrl="$ci_url" \
--set slack-notifications.link.url="https://${deployment_host}${deployment_path}" \
--set sync-secrets.secrets[0]="${deployment_host}-tls" \
--set sync-secrets.secrets[1]="dockerhub" \
--set github-status-deployment-link.github.user="$github_user" \
--set github-status-deployment-link.github.password="$github_pass" \
--set github-status-deployment-link.github.project="$github_project" \
Expand Down