Skip to content

Test MinIO Operator in OpenShift

Cesar Celis Hernandez edited this page Feb 14, 2023 · 5 revisions

Objective:

To test code change of MinIO Operator in OpenShift.

Steps:

  1. 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)
  1. Compile it:
make docker
Clone this wiki locally