Created
October 15, 2020 19:17
-
-
Save myoung34/30c6c13f92b263a6041261bcd4014a12 to your computer and use it in GitHub Desktop.
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
| --- | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| namespace: default | |
| name: vault-auth | |
| --- | |
| # Source: vault/templates/injector-serviceaccount.yaml | |
| apiVersion: v1 | |
| kind: ServiceAccount | |
| metadata: | |
| name: vault-agent-injector | |
| namespace: default | |
| labels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| --- | |
| # Source: vault/templates/injector-clusterrole.yaml | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRole | |
| metadata: | |
| name: vault-agent-injector-clusterrole | |
| labels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| rules: | |
| - apiGroups: ["admissionregistration.k8s.io"] | |
| resources: ["mutatingwebhookconfigurations"] | |
| verbs: | |
| - "get" | |
| - "list" | |
| - "watch" | |
| - "patch" | |
| --- | |
| # Source: vault/templates/injector-clusterrolebinding.yaml | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: ClusterRoleBinding | |
| metadata: | |
| name: vault-agent-injector-binding | |
| labels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| roleRef: | |
| apiGroup: rbac.authorization.k8s.io | |
| kind: ClusterRole | |
| name: vault-agent-injector-clusterrole | |
| subjects: | |
| - kind: ServiceAccount | |
| name: vault-agent-injector | |
| namespace: default | |
| --- | |
| # Source: vault/templates/injector-service.yaml | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: vault-agent-injector-svc | |
| namespace: default | |
| labels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| spec: | |
| ports: | |
| - port: 443 | |
| targetPort: 8080 | |
| selector: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| component: webhook | |
| --- | |
| # Source: vault/templates/injector-deployment.yaml | |
| # Deployment for the injector | |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: vault-agent-injector | |
| namespace: default | |
| labels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| component: webhook | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| component: webhook | |
| template: | |
| metadata: | |
| labels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| component: webhook | |
| spec: | |
| serviceAccountName: "vault-agent-injector" | |
| securityContext: | |
| runAsNonRoot: true | |
| runAsGroup: 1000 | |
| runAsUser: 100 | |
| containers: | |
| - name: sidecar-injector | |
| image: "hashicorp/vault-k8s:0.5.0" | |
| imagePullPolicy: "IfNotPresent" | |
| env: | |
| - name: AGENT_INJECT_LISTEN | |
| value: ":8080" | |
| - name: AGENT_INJECT_LOG_LEVEL | |
| value: info | |
| - name: AGENT_INJECT_VAULT_ADDR | |
| value: http://192.168.2.113:8200 | |
| - name: AGENT_INJECT_VAULT_AUTH_PATH | |
| value: auth/kubernetes | |
| - name: AGENT_INJECT_VAULT_IMAGE | |
| value: "vault:1.5.2" | |
| - name: AGENT_INJECT_TLS_AUTO | |
| value: vault-agent-injector-cfg | |
| - name: AGENT_INJECT_TLS_AUTO_HOSTS | |
| value: vault-agent-injector-svc,vault-agent-injector-svc.default,vault-agent-injector-svc.default.svc | |
| - name: AGENT_INJECT_LOG_FORMAT | |
| value: standard | |
| - name: AGENT_INJECT_REVOKE_ON_SHUTDOWN | |
| value: "false" | |
| args: | |
| - agent-inject | |
| - 2>&1 | |
| livenessProbe: | |
| httpGet: | |
| path: /health/ready | |
| port: 8080 | |
| scheme: HTTPS | |
| failureThreshold: 2 | |
| initialDelaySeconds: 1 | |
| periodSeconds: 2 | |
| successThreshold: 1 | |
| timeoutSeconds: 5 | |
| readinessProbe: | |
| httpGet: | |
| path: /health/ready | |
| port: 8080 | |
| scheme: HTTPS | |
| failureThreshold: 2 | |
| initialDelaySeconds: 2 | |
| periodSeconds: 2 | |
| successThreshold: 1 | |
| timeoutSeconds: 5 | |
| --- | |
| # Source: vault/templates/injector-mutating-webhook.yaml | |
| apiVersion: admissionregistration.k8s.io/v1beta1 | |
| kind: MutatingWebhookConfiguration | |
| metadata: | |
| name: vault-agent-injector-cfg | |
| labels: | |
| app.kubernetes.io/name: vault-agent-injector | |
| app.kubernetes.io/instance: vault | |
| webhooks: | |
| - name: vault.hashicorp.com | |
| clientConfig: | |
| service: | |
| name: vault-agent-injector-svc | |
| namespace: default | |
| path: "/mutate" | |
| caBundle: "" | |
| rules: | |
| - operations: ["CREATE", "UPDATE"] | |
| apiGroups: [""] | |
| apiVersions: ["v1"] | |
| resources: ["pods"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment