How to upgrade the Vault Package chart📜
- Sync with upstream chart. This can be done with kpt or meld:
or
kpt pkg update chart/@{TAG} --strategy alpha-git-patch
orkpt pkg update chart/@{TAG} --strategy force-delete-replace
BigBang makes modifications to the upstream helm chart. The full list of changes is at the end of this document.
Testing new Vault version📜
- Create a k8s dev environment. One option is to use the Big Bang k3d-dev.sh with no arguments which will give you the default configuration. The following steps assume you are using the script. NOTE: you will need to run it with
-m
and once it’s done setup sshuttle and your hosts file. - Follow the instructions at the end of the script to connect to the k8s cluster and install flux.
- Deploy Vault with these dev values overrides. Core apps are disabled for quick deployment.
- Kyverno blocks PVC provisioning on k3d by default because they are local path, need to add the dev exception(s)
domain: bigbang.dev flux: interval: 1m rollback: cleanupOnFail: false networkPolicies: enabled: true jaeger: enabled: false kiali: enabled: false clusterAuditor: enabled: false gatekeeper: enabled: false fluentbit: enabled: false monitoring: enabled: false twistlock: enabled: false istio: ingressGateways: passthrough-ingressgateway: type: "LoadBalancer" gateways: passthrough: ingressGateways: "passthrough-ingressgateway" hosts: - "vault.dev.bigbang.mil" tls: mode: "PASSTHROUGH" kyvernoPolicies: enabled: true values: exclude: any: # Allows k3d load balancer to bypass policies. - resources: namespaces: - istio-system - vault names: - svclb-* policies: restrict-host-path-mount-pv: parameters: allow: - /var/lib/rancher/k3s/storage/pvc-* addons: vault: enabled: true git: repo: https://repo1.dso.mil/big-bang/product/packages/vault.git path: chart tag: null # tag: 6.3.4 branch: "57-implement-istio-authorization-policies" # existingSecret: "" # credentials: # password: "" # username: "" values: istio: enabled: true hardened: enabled: true # enabled: false global: tlsDisable: false ingress: gateway: passthrough key: | -----BEGIN PRIVATE KEY----- MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC9eqdce6kUk/Iq CXf2AA0Xd/wOAoxGjhJbcCu4Ckl86wsXiV9aMyCVucPxbI84x1Ahv2xX9CY6WKRf kVn9TBIaADUDvIWPZ6A/dV7CcdsYpU8XrQ7dPV/PC2L90WePz8Z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RydXN0LmNvbS9E U1RST09UQ0FYM0NSTC5jcmwwHQYDVR0OBBYEFHm0WeZ7tuXkAXOACIjIGlj26Ztu MA0GCSqGSIb3DQEBCwUAA4IBAQAKcwBslm7/DlLQrt2M51oGrS+o44+/yQoDFVDC 5WxCu2+b9LRPwkSICHXM6webFGJueN7sJ7o5XPWioW5WlHAQU7G75K/QosMrAdSW 9MUgNTP52GE24HGNtLi1qoJFlcDyqSMo59ahy2cI2qBDLKobkx/J3vWraV0T9VuG WCLKTVXkcGdtwlfFRjlBz4pYg1htmf5X6DYO8A4jqv2Il9DjXA6USbW1FzXSLr9O he8Y4IWS6wY7bCkjCWDcRQJMEhg76fsO3txE+FiYruq9RUWhiF1myv4Q6W+CyBFC Dfvp7OOGAN6dEOM4+qR9sdjoSYKEBpsr6GtPAQw4dy753ec5 -----END CERTIFICATE-----
- Browse to https://vault.dev.bigbang.mil
- Set Method to Token and log in. To get the token, run:
kubectl get secret -n vault vault-token -o go-template='{{.data.key | base64decode}}'
- Once you’ve logged in, choose Tools from the left-hand column.
- Now choose Random from the left-hand column. Click Generate to generate a random 32 byte base64 value. Copy this value to your clipboard.
- Click “back to main navigation.” Under Secrets Engines on the main page, you should see the cubbyhole secrets engine. Click on it.
- Click Create Secret
- Under “Path for this secret” enter ~
- Under “Secret data” enter test01 for your secret and for the secret data, paste in the random base64 value you generated above.
- Click Save. Confirm that you see your secret listed.
- In the left-hand column, click Policies. You should see these policies listed: default, prometheus-metrics, and root.
Modifications made to upstream chart📜
This is a high-level list of modifitations that Big Bang has made to the upstream helm chart. You can use this as as cross-check to make sure that no modifications were lost during the upgrade process.
chart/charts/*📜
- sub-charts generated with
helm dependency update
chart/dashboards/*📜
- Grafana dashboard support
chart/deps/*📜
- add MinIO and
helm dependency update
chart/templates/bigbang/*📜
- add templates to support Big Bang integration
chart/templates/server-service.yaml📜
- add
prometeus-metrics: "true"
to end ofmetadata: labels:
chart/templates/injector-deployment.yaml📜
- ensure
AGENT_INJECT_VAULT_ADDR
environment variable has third if else option checking for.Values.server.ha.apiAddr
. This is a BigBang addition.
chart/templates/csi-daemonset.yaml📜
- ensure
VAULT_ADDR
environment variable has if else option checking for.Values.server.ha.apiAddr
. This is a BigBang addition.
chart/templates/tests/*📜
- delete server-test.yaml
chart/tests/*📜
- add cypress tests
chart/Chart.yaml📜
- version/appVersion
- add gluon dependency
- Update bigbang.dev/applicationVersions
chart/values.yaml📜
- BigBang additions lines 1010-1055
- BigBang edited lines 789-795,881-887,921-927
automountServiceAccountToken📜
The mutating Kyverno policy named update-automountserviceaccounttokens
is leveraged to harden all ServiceAccounts in this package with automountServiceAccountToken: false
. This policy is configured by namespace in the Big Bang umbrella chart repository at chart/templates/kyverno-policies/values.yaml.
This policy revokes access to the K8s API for Pods utilizing said ServiceAccounts. If a Pod truly requires access to the K8s API (for app functionality), the Pod is added to the pods:
array of the same mutating policy. This grants the Pod access to the API, and creates a Kyverno PolicyException to prevent an alert.
Files that need integration testing📜
If you modify any of these things, you should perform an integration test with your branch against the rest of bigbang. Some of these files have automatic tests already defined, but those automatic tests may not model corner cases found in full integration scenarios.
./chart/templates/prometheus-*
./chart/templates/bigbang/istio
./chart/templates/bigbang/networkpolicies
./chart/templates/bigbang/vault-*
./chart/templates/autoUnsealAndInit
./chart/templates/bigbang/networkPolicies
./chart/templates/bigbang/gitlab-grafana-dashboards.yaml
./chart/templates/server-network-policy.yaml
./chart/templates/server-ingress.yaml
./chart/templates/injector-mutating-webhook.yaml
./chart/templates/injector-network-policy.yaml
./chart/templates/injector-clusterrole*
./chart/values.yaml
if it involves any of:- monitoring changes
- network policy changes
- kyverno policy changes
- istio hardening rule changes
- service definition changes
- TLS settings
- vault mutating webhook settings
- server ingress settings
- headless server settings (especially port or other comms settings)
Follow the standard process for performing an integration test against bigbang.