Skip to content

Commit

Permalink
test: update rbac resource names
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Sep 4, 2024
1 parent 32aec04 commit 0c96171
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
9 changes: 5 additions & 4 deletions config/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ spec:
apiVersion: v1
kind: ServiceAccount
metadata:
name: webhook
name: kcl-webhook
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down Expand Up @@ -113,14 +113,14 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: webhook-rolebinding
name: kcl-webhook-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: webhook-role
name: kcl-webhook-role
subjects:
- kind: ServiceAccount
name: webhook
name: kcl-webhook
namespace: default
---
apiVersion: v1
Expand Down Expand Up @@ -181,6 +181,7 @@ spec:
volumeMounts:
- mountPath: /etc/webhook/certs
name: webhook-certs
serviceAccountName: kcl-webhook
volumes:
- emptyDir: {}
name: webhook-certs
6 changes: 3 additions & 3 deletions config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: webhook-rolebinding
name: kcl-webhook-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: webhook-role
name: kcl-webhook-role
subjects:
- kind: ServiceAccount
name: webhook
name: kcl-webhook
namespace: default
2 changes: 1 addition & 1 deletion config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: webhook
name: kcl-webhook
namespace: default
1 change: 1 addition & 0 deletions config/webhook/webhook.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
labels:
app: kcl-webhook-server
spec:
serviceAccountName: kcl-webhook
initContainers:
- name: kcl-webhook-init
image: kcllang/webhook-init
Expand Down
3 changes: 2 additions & 1 deletion scripts/deploy_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ if [ $ROLLOUT_STATUS -ne 0 ]; then
for pod in $PODS; do
echo -e "${YELLOW}Pod: $pod${NC}"
kubectl describe pod/$pod
echo -e "${YELLOW}Pod logs:${NC}"
echo -e "${YELLOW}Pod init container logs:${NC}"
kubectl logs $pod -c kcl-webhook-init
echo -e "${YELLOW}Pod main container logs:${NC}"
kubectl logs $pod -c kcl-webhook-server
done
else
Expand Down

0 comments on commit 0c96171

Please sign in to comment.