update vault integration
This commit is contained in:
65
examples/rollouts-app-test.yaml
Normal file
65
examples/rollouts-app-test.yaml
Normal file
@@ -0,0 +1,65 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: canary-demo-preview
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: canary-demo
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: canary-demo
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: canary-demo
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Rollout
|
||||
metadata:
|
||||
name: canary-demo
|
||||
spec:
|
||||
replicas: 5
|
||||
revisionHistoryLimit: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: canary-demo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: canary-demo
|
||||
spec:
|
||||
containers:
|
||||
- name: canary-demo
|
||||
image: argoproj/rollouts-demo:green
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
resources:
|
||||
requests:
|
||||
memory: 32Mi
|
||||
cpu: 5m
|
||||
strategy:
|
||||
canary:
|
||||
canaryService: canary-demo-preview
|
||||
steps:
|
||||
- setWeight: 20
|
||||
- pause: {}
|
||||
- setWeight: 40
|
||||
- pause: { duration: 10 }
|
||||
- setWeight: 60
|
||||
- pause: { duration: 10 }
|
||||
- setWeight: 80
|
||||
- pause: { duration: 10 }
|
||||
38
examples/vault-inject-example.yaml
Normal file
38
examples/vault-inject-example.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: vault-inject-example
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: vault-inject-example-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vault-inject-example
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vault-inject-example
|
||||
annotations:
|
||||
vault.hashicorp.com/agent-inject: "true"
|
||||
vault.hashicorp.com/role: "vault-example"
|
||||
vault.hashicorp.com/agent-inject-secret-env: "vault-example/creds"
|
||||
vault.hashicorp.com/auth-path: "auth/kubernetes-local"
|
||||
vault.hashicorp.com/agent-inject-template-env: |
|
||||
{{- with secret "vault-example/creds" -}}
|
||||
{{- range $key, $value := .Data.data }}
|
||||
export {{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
containers:
|
||||
- name: app
|
||||
image: "postgres:latest"
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: admin
|
||||
serviceAccountName: vault-inject-example
|
||||
Reference in New Issue
Block a user