File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed
Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 1414# See the License for the specific language governing permissions and
1515# limitations under the License.
1616
17+ CONFIG=" $( mktemp) "
18+ cat << EOF > $CONFIG
19+ kind: Cluster
20+ apiVersion: kind.x-k8s.io/v1alpha4
21+ name: k8s
22+ nodes:
23+ - role: control-plane
24+ kubeadmConfigPatches:
25+ - |
26+ kind: InitConfiguration
27+ nodeRegistration:
28+ kubeletExtraArgs:
29+ node-labels: "ingress-ready=true"
30+ extraPortMappings:
31+ - containerPort: 80
32+ hostPort: 80
33+ protocol: TCP
34+ - containerPort: 443
35+ hostPort: 443
36+ protocol: TCP
37+ EOF
38+
39+
40+
1741# Create Kind cluster
1842kind delete cluster --name k8s
19- kind create cluster --config ./hack/kind/kind-config.yaml
43+ kind create cluster --config $CONFIG
2044kubectl cluster-info --context kind-k8s
2145kubectl create namespace knative-serving
2246kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml
@@ -48,3 +72,6 @@ kubectl apply -f https://github.com/knative-sandbox/security-guard/releases/down
4872
4973# add myapp - protected using a separate guard pod (non-recommended pattern)
5074kubectl apply -f https://github.com/knative-sandbox/security-guard/releases/download/v0.5.0/secured-layered-myapp.yaml
75+
76+ # cleanup
77+ rm $CONFIG
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ func (hc *httpClient) ReadToken(audience string) (tokenActive bool) {
6868 if hc .tokenRefreshTime .After (now ) {
6969 return
7070 }
71- // refresh in 100 minuets
72- hc .tokenRefreshTime = now .Add (100 * time .Minute )
71+ // refresh in 5 minuets
72+ hc .tokenRefreshTime = now .Add (5 * time .Minute )
7373
7474 // TODO: replace "/var/run/secrets/tokens" with sharedMain.QPOptionTokenDirPath once merged.
7575 b , err := os .ReadFile (path .Join ("/var/run/secrets/tokens" , audience ))
You can’t perform that action at this time.
0 commit comments