-
Notifications
You must be signed in to change notification settings - Fork 0
Test MinIO Operator in OpenShift
Cesar Celis Hernandez edited this page Feb 14, 2023
·
5 revisions
To test code change of MinIO Operator in OpenShift.
- Modify the code, example:
- File:
/Users/cniackz/operator/pkg/controller/cluster/main-controller.go
klog.Info("Starting workers")
// Launch two workers to process Tenant resources
for i := 0; i < threadiness; i++ {
go wait.Until(c.runWorker, time.Second, stopCh)
}
// I want to get the csr-signer secret to mount the certificate in Operator Pod to trust the tenant in OpenShift!
// oc get secret csr-signer -n openshift-kube-controller-manager-operator -o template='{{ index .data "tls.crt"}}' | base64 -d
klog.Info("Checking if this is OpenShift Environment...")
var myKubeSecret = kubernetes.V1().Secrets("openshift-kube-controller-manager-operator").Find("csr-signer")
klog.Infof("myKubeSecret: %s", myKubeSecret)
// Expected:
// NAME TYPE DATA AGE
// csr-signer kubernetes.io/tls 2 28d
// Launch a single worker for Health Check reacting to Pod Changes
go wait.Until(c.runHealthCheckWorker, time.Second, stopCh)
- Compile it:
make docker