Last active
May 20, 2021 12:00
-
-
Save lukaszbudnik/93932736f9eaf7b11290d80fdc2db39c to your computer and use it in GitHub Desktop.
dev.to - config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl create configmap haproxy-auth-gateway-cfg --from-file=config/haproxy.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl create secret generic -n hotel db-credentials \ | |
--from-literal=username=someuser \ | |
--from-literal=password='PasswordWithSpecialCharsLikeThis:S!\*$=' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: gateway | |
labels: | |
app.kubernetes.io/name: gateway | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app.kubernetes.io/name: gateway | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/name: gateway | |
spec: | |
containers: | |
- name: gateway | |
image: lukasz/yosoy | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- name: haproxy-cfg | |
mountPath: /usr/local/etc/haproxy | |
volumes: | |
- name: haproxy-cfg | |
configMap: | |
name: haproxy-auth-gateway-cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: bookmaker | |
labels: | |
app.kubernetes.io/name: bookmaker | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app.kubernetes.io/name: bookmaker | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/name: bookmaker | |
spec: | |
containers: | |
- name: bookmaker | |
image: lukasz/yosoy | |
env: | |
- name: DB_USER | |
valueFrom: | |
secretKeyRef: | |
name: db-credentials | |
key: username | |
- name: DB_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: db-credentials | |
key: password | |
ports: | |
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataSource: "user=${DB_USER} password=${DB_PASSWORD} dbname=${DB_NAME} host=${DB_HOST} port=${DB_PORT}" | |
webHookHeaders: | |
- "X-Security-Token: ${SECURITY_TOKEN}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These are code samples and listings for my dev.to article: https://dev.to/lukaszbudnik/building-cloud-native-apps-config-and-toggles-2384