generated from mrsimonemms/new
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kubernetes): install bank vaults operator
- Loading branch information
1 parent
16e729d
commit 7e2b8a0
Showing
7 changed files
with
253 additions
and
0 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: vault-operator | ||
namespace: argocd | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "10" | ||
spec: | ||
project: default | ||
source: | ||
chart: vault-operator | ||
repoURL: ghcr.io/bank-vaults/helm-charts | ||
targetRevision: 1.22.3 | ||
destination: | ||
server: https://kubernetes.default.svc | ||
namespace: vault | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- CreateNamespace=true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: vault-file | ||
namespace: vault | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "12" | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 1Gi |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: vault-rbac | ||
namespace: argocd | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "11" | ||
spec: | ||
project: default | ||
source: | ||
path: deploy/rbac | ||
repoURL: https://github.com/bank-vaults/vault-operator | ||
targetRevision: HEAD | ||
kustomize: | ||
namespace: vault | ||
destination: | ||
namespace: vault | ||
server: https://kubernetes.default.svc | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- CreateNamespace=true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
apiVersion: vault.banzaicloud.com/v1alpha1 | ||
kind: Vault | ||
metadata: | ||
name: vault | ||
namespace: vault | ||
annotations: | ||
argocd.argoproj.io/sync-wave: "12" | ||
spec: | ||
size: 1 | ||
image: hashicorp/vault:1.18.1 | ||
|
||
annotations: | ||
common/annotation: "true" | ||
|
||
vaultAnnotations: | ||
type/instance: "vault" | ||
|
||
vaultConfigurerAnnotations: | ||
type/instance: "vaultconfigurer" | ||
|
||
vaultLabels: | ||
example.com/log-format: "json" | ||
|
||
vaultConfigurerLabels: | ||
example.com/log-format: "string" | ||
|
||
serviceAccount: vault | ||
|
||
serviceType: ClusterIP | ||
|
||
ingress: | ||
annotations: {} | ||
spec: {} | ||
|
||
volumes: | ||
- name: vault-file | ||
persistentVolumeClaim: | ||
claimName: vault-file | ||
|
||
volumeMounts: | ||
- name: vault-file | ||
mountPath: /vault/file | ||
|
||
caNamespaces: | ||
- "vswh" | ||
|
||
unsealConfig: | ||
options: | ||
preFlightChecks: true | ||
storeRootToken: true | ||
secretShares: 5 | ||
secretThreshold: 3 | ||
kubernetes: | ||
secretNamespace: vault | ||
|
||
config: | ||
storage: | ||
file: | ||
path: "${ .Env.VAULT_STORAGE_FILE }" | ||
listener: | ||
tcp: | ||
address: "0.0.0.0:8200" | ||
# tls_disable: true | ||
tls_cert_file: /vault/tls/server.crt | ||
tls_key_file: /vault/tls/server.key | ||
telemetry: | ||
statsd_address: localhost:9125 | ||
ui: true | ||
|
||
externalConfig: | ||
policies: | ||
- name: allow_secrets | ||
rules: path "secret/*" { | ||
capabilities = ["create", "read", "update", "delete", "list"] | ||
} | ||
- name: allow_pki | ||
rules: path "pki/*" { | ||
capabilities = ["create", "read", "update", "delete", "list"] | ||
} | ||
|
||
groups: | ||
- name: admin1 | ||
policies: | ||
- allow_secrets | ||
metadata: | ||
privileged: true | ||
type: external | ||
- name: admin2 | ||
policies: | ||
- allow_secrets | ||
metadata: | ||
privileged: true | ||
type: external | ||
|
||
group-aliases: | ||
- name: admin1 | ||
mountpath: token | ||
group: admin1 | ||
|
||
auth: | ||
- type: kubernetes | ||
roles: | ||
- name: default | ||
bound_service_account_names: | ||
["default", "vault-secrets-webhook", "vault"] | ||
bound_service_account_namespaces: ["vault", "vswh"] | ||
policies: ["allow_secrets", "allow_pki"] | ||
ttl: 1h | ||
|
||
secrets: | ||
- path: secret | ||
type: kv | ||
description: General secrets. | ||
options: | ||
version: 2 | ||
|
||
- path: pki | ||
type: pki | ||
description: Vault PKI Backend | ||
config: | ||
default_lease_ttl: 168h | ||
max_lease_ttl: 720h | ||
configuration: | ||
config: | ||
- name: urls | ||
issuing_certificates: https://vault.vault:8200/v1/pki/ca | ||
crl_distribution_points: https://vault.vault:8200/v1/pki/crl | ||
root/generate: | ||
- name: internal | ||
common_name: vault.vault | ||
roles: | ||
- name: default | ||
allowed_domains: localhost,pod,svc,default | ||
allow_subdomains: true | ||
generate_lease: true | ||
ttl: 1m | ||
|
||
startupSecrets: | ||
- type: kv | ||
path: secret/data/accounts/aws | ||
data: | ||
data: | ||
AWS_ACCESS_KEY_ID: secretId | ||
AWS_SECRET_ACCESS_KEY: s3cr3t | ||
- type: kv | ||
path: secret/data/dockerrepo | ||
data: | ||
data: | ||
DOCKER_REPO_USER: dockerrepouser | ||
DOCKER_REPO_PASSWORD: dockerrepopassword | ||
- type: kv | ||
path: secret/data/mysql | ||
data: | ||
data: | ||
MYSQL_ROOT_PASSWORD: s3cr3t | ||
MYSQL_PASSWORD: 3xtr3ms3cr3t | ||
|
||
vaultEnvsConfig: | ||
- name: VAULT_LOG_LEVEL | ||
value: debug | ||
- name: VAULT_STORAGE_FILE | ||
value: "/vault/file" | ||
|
||
istioEnabled: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: vault-components | ||
namespace: argocd | ||
finalizers: | ||
- resources-finalizer.argocd.argoproj.io | ||
spec: | ||
project: default | ||
source: | ||
repoURL: https://github.com/mrsimonemms/infrastructure | ||
path: registry/clusters/dev/components/vault | ||
targetRevision: HEAD | ||
destination: | ||
server: https://kubernetes.default.svc | ||
namespace: vault | ||
syncPolicy: | ||
automated: | ||
prune: true | ||
selfHeal: true | ||
syncOptions: | ||
- CreateNamespace=true |