-
Notifications
You must be signed in to change notification settings - Fork 5
Adding mig mutating webhook sources #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| kind: MutatingWebhookConfiguration | ||
| metadata: | ||
| annotations: | ||
| kubectl.kubernetes.io/last-applied-configuration: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets remove this as not required
| @@ -0,0 +1 @@ | |||
| Initial commit mig mutating webhook | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add instruction explaining why/ -- how to deploy/use it
| if key == "ca.crt" { | ||
|
|
||
| caPEM = value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if key == "ca.crt" { | |
| caPEM = value | |
| if key == "ca.crt" { | |
| caPEM = value |
same at other places
| clientTLSCert = &tls.Config{RootCAs: certpool} | ||
|
|
||
| } else { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to have a separate function to generate cert
|
|
||
| k8sSecretsClient = k8sclientset.CoreV1().Secrets(currentNamespace) | ||
|
|
||
| ctx = context.Background() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: usually context is declared at top and passed down to child functions whenever required
|
|
||
| ctx = context.Background() | ||
|
|
||
| _, err = k8sSecretsClient.Get(ctx, "migmutatingwebhook-tls", metav1.GetOptions{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use constant for "migmutatingwebhook-tls"
|
|
||
| func CreateCertSecret(serverCert, serverKey, caCert string) { | ||
|
|
||
| kuebConfigFilePath := filepath.Join("/etc", "rancher", "rke2", "rke2.yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of using rke2.yaml we can either use config from KUBECONFIG or in cluster config
Added sources for mutating webhook to allow the usage of mixed profile MIG gpus in AI Center pipelines.