Last active
April 2, 2021 09:10
-
-
Save andrei-dascalu/0c3bcce0d86849c3c56646f2caf5cc66 to your computer and use it in GitHub Desktop.
Kustomize - base
This file contains hidden or 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
--- | |
# deployment | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: main | |
name: mainapp | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: main | |
strategy: | |
rollingUpdate: | |
maxSurge: 1 | |
maxUnavailable: 0 | |
type: RollingUpdate | |
template: | |
metadata: | |
labels: | |
app: main | |
spec: | |
containers: | |
- image: bitnami/apache-exporter:0.8.0 | |
name: apache-exporter | |
imagePullPolicy: Always | |
command: ["/bin/bash", "-c", "apache_exporter --scrape_uri=\"http://127.0.0.1/server-status?auto\""] | |
ports: | |
- containerPort: 9117 | |
name: metrics-port | |
protocol: TCP | |
resources: | |
requests: | |
cpu: 50m | |
memory: 64Mi | |
limits: | |
cpu: 100m | |
memory: 64Mi | |
- name: mainapp | |
image: mainapp/base:1.0.0 | |
imagePullPolicy: IfNotPresent | |
lifecycle: | |
postStart: | |
exec: | |
command: ["/bin/bash", "-c", "cd /var/www/html && /usr/bin/post-start"] | |
envFrom: | |
- secretRef: | |
name: "customer-config-main" | |
- secretRef: | |
name: "customer-environment-config-db" | |
- configMapRef: | |
name: config-common | |
env: | |
- name: CUSTOMER_SHORTNAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.labels['customer'] | |
- name: ENV_LEVEL | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.labels['env'] | |
ports: | |
- containerPort: 80 | |
name: web-port | |
protocol: TCP | |
resources: | |
limits: | |
cpu: 500m | |
memory: 512Mi | |
requests: | |
cpu: 250m | |
memory: 256Mi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment