Skip to content

Commit 14f66b0

Browse files
committed
add: additional configurations
1 parent 76f065f commit 14f66b0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

raycluster_webhook/config/deployment.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ spec:
2323
runAsUser: 1234
2424
containers:
2525
- name: server
26-
image: quay.io/rh_ee_egallina/altwebhook:v83
26+
image: quay.io/rh_ee_egallina/altwebhook:v89
2727
imagePullPolicy: Always
2828
ports:
2929
- containerPort: 8443
@@ -43,7 +43,7 @@ apiVersion: v1
4343
kind: ServiceAccount
4444
metadata:
4545
name: raycluster-mutating-webhook
46-
namespgce: default
46+
namespace: default
4747
---
4848
apiVersion: rbac.authorization.k8s.io/v1
4949
kind: ClusterRole
@@ -56,6 +56,9 @@ rules:
5656
- apiGroups: ["ray.io"]
5757
resources: ["rayclusters"]
5858
verbs: ["get", "watch", "list", "update", "patch"]
59+
- apiGroups: [""]
60+
resources: ["secrets"]
61+
verbs: ["get", "watch", "list"]
5962
---
6063
apiVersion: rbac.authorization.k8s.io/v1
6164
kind: ClusterRoleBinding
@@ -75,6 +78,8 @@ kind: Service
7578
metadata:
7679
name: raycluster-mutating-webhook
7780
namespace: default
81+
annotations:
82+
service.beta.openshift.io/serving-cert-secret-name: raycluster-webhook-cert
7883
spec:
7984
selector:
8085
app: raycluster-mutating-webhook
@@ -101,6 +106,7 @@ webhooks:
101106
name: raycluster-mutating-webhook
102107
namespace: default
103108
path: "/mutate"
109+
caBundle: ''
104110
rules:
105111
- operations: ["CREATE", "UPDATE"]
106112
apiGroups: ["ray.io"]

raycluster_webhook/src/main.go

+2
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ func main() {
4949
flag.StringVar(&serverParameters.certFile, "tlsCertFile", "/etc/webhook/certs/tls.crt", "File containing the x509 Certificate for HTTPS.")
5050
flag.StringVar(&serverParameters.keyFile, "tlsKeyFile", "/etc/webhook/certs/tls.key", "File containing the x509 private key to --tlsCertFile.")
5151
flag.Parse()
52+
53+
k8sClientSet = createClientSet()
5254

5355
// Configure HTTPS server
5456
http.HandleFunc("/", HandleRoot)

0 commit comments

Comments
 (0)