Skip to content

Commit

Permalink
Remove unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
bpradipt committed May 25, 2022
1 parent 47bc21a commit 80771a5
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
secv1 "github.com/openshift/api/security/v1"
mcfgapi "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io"
corev1 "k8s.io/api/core/v1"
k8serrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
Expand Down Expand Up @@ -93,15 +92,6 @@ func main() {
}

if isOpenshift {
// Create the custom SCC

err = createScc(context.TODO(), mgr)
if err != nil {
setupLog.Error(err, "unable to create SCC")
os.Exit(1)
}

setupLog.Info("created SCC")

err = labelNamespace(context.TODO(), mgr)
if err != nil {
Expand Down Expand Up @@ -134,18 +124,6 @@ func main() {
}
}

func createScc(ctx context.Context, mgr manager.Manager) error {

scc := controllers.GetScc()
err := mgr.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(scc), scc)
if err != nil && k8serrors.IsNotFound(err) {
setupLog.Info("Creating SCC")
return mgr.GetClient().Create(ctx, scc, &client.CreateOptions{})
}

return err
}

func labelNamespace(ctx context.Context, mgr manager.Manager) error {

//label := map[string]string{"openshift.io/cluster-monitoring": "true"}
Expand Down

0 comments on commit 80771a5

Please sign in to comment.