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
| #!/usr/bin/env bash | |
| DATA_DIR="/opt/local-path-provisioner" | |
| PV_LIST=$(kubectl get pv -o json | jq -r '.items[] | select(.spec.hostPath.path != null) | .spec.hostPath.path') | |
| #for node in $(kubectl get nodes -o name | cut -d/ -f2); do | |
| for node in $(kubectl get nodes -o wide | awk '{print $6}' | tail -n +2); do | |
| echo | |
| echo "===== NODE: $node =====" |
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: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: bluegreen-demo | |
| annotations: | |
| nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
| spec: | |
| rules: | |
| - host: bluegreen-demo.lvh.me | |
| http: |
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: argoproj.io/v1alpha1 | |
| kind: Rollout | |
| metadata: | |
| name: bluegreen-demo | |
| labels: | |
| app: bluegreen-demo | |
| spec: | |
| replicas: 3 | |
| revisionHistoryLimit: 1 | |
| selector: |
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: networking.k8s.io/v1 | |
| kind: Ingress | |
| metadata: | |
| name: canary-demo | |
| annotations: | |
| nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
| spec: | |
| rules: | |
| - host: canary-demo.lvh.me | |
| http: |
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: argoproj.io/v1alpha1 | |
| kind: Rollout | |
| metadata: | |
| name: canary-demo | |
| spec: | |
| replicas: 5 | |
| revisionHistoryLimit: 1 | |
| selector: | |
| matchLabels: | |
| app: canary-demo |
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
| stages: | |
| - vault | |
| read_secrets: | |
| stage: vault | |
| image: hashicorp/vault:1.14 | |
| variables: | |
| VAULT_ADDR: https://vault.default.svc.cluster.local:8200 | |
| VAULT_SKIP_VERIFY: 'true' | |
| VAULT_AUTH_ROLE: myproject-production |
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
| vault write auth/jwt/config \ | |
| oidc_discovery_url="https://gitlab.com" \ | |
| bound_issuer="https://gitlab.com" |
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
| vault write auth/jwt/role/myproject-staging - <<EOF | |
| { | |
| "role_type": "jwt", | |
| "policies": ["myproject-staging"], | |
| "token_explicit_max_ttl": 60, | |
| "user_claim": "user_email", | |
| "bound_claims": { | |
| "project_id": "51459829", | |
| "ref": "staging*", | |
| "ref_type": "branch" |
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
| vault policy write myproject-staging - <<EOF | |
| # Policy name: myproject-staging | |
| # | |
| # Read-only permission on 'secret/myproject/staging/*' path | |
| path "secret/data/myproject/staging/*" { | |
| capabilities = [ "read" ] | |
| } | |
| EOF | |
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: | |
| name: gitlab-user | |
| namespace: gitlab-runner | |
| --- | |
| apiVersion: rbac.authorization.k8s.io/v1 | |
| kind: Role | |
| metadata: | |
| name: gitlab-user |
NewerOlder