File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
infrastructure-as-code/k8s-cluster-gke
self-serve-infrastructure/cats-and-dogs Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ resource "google_container_cluster" "k8sexample" {
27
27
master_auth {
28
28
username = " ${ var . master_username } "
29
29
password = " ${ var . master_password } "
30
+
31
+ client_certificate_config {
32
+ issue_client_certificate = true
33
+ }
30
34
}
31
35
32
36
node_config {
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
# Authenticate against Vault
3
- login_result=$( curl --request POST --data ' {"role": "demo", "jwt": "' " ${K8S_TOKEN} " ' "}' ${VAULT_ADDR} /v1/auth/${VAULT_K8S_BACKEND} login)
3
+ login_result=$( curl --request POST --data ' {"role": "demo", "jwt": "' " ${K8S_TOKEN} " ' "}' ${VAULT_ADDR} /v1/auth/${VAULT_K8S_BACKEND} / login)
4
4
5
5
# Read cats-and-dogs secret from Vault
6
6
vault_token=$( echo $login_result | python3 -c " import sys, json; print(json.load(sys.stdin)['auth']['client_token'])" )
Original file line number Diff line number Diff line change 19
19
try :
20
20
client = hvac .Client (url = os .environ ['VAULT_ADDR' ])
21
21
params = {'role' :'demo' , 'jwt' :os .environ ['K8S_TOKEN' ]}
22
- result = client .auth ('/v1/auth/' + os .environ ['VAULT_K8S_BACKEND' ] + 'login' , json = params )
22
+ result = client .auth ('/v1/auth/' + os .environ ['VAULT_K8S_BACKEND' ] + '/ login' , json = params )
23
23
print (result )
24
24
25
25
# Redis configurations
You can’t perform that action at this time.
0 commit comments