Skip to content

Commit c82dca5

Browse files
Merge pull request #563 from ecordell/remove-ns-annotator
Remove ns annotator
2 parents 668c264 + 450b30d commit c82dca5

File tree

5 files changed

+7
-590
lines changed

5 files changed

+7
-590
lines changed

cmd/olm/main.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ import (
2121
)
2222

2323
const (
24-
envOperatorName = "OPERATOR_NAME"
25-
envOperatorNamespace = "OPERATOR_NAMESPACE"
26-
ALMManagedAnnotationKey = "alm-manager"
27-
2824
defaultWakeupInterval = 5 * time.Minute
2925
)
3026

@@ -75,17 +71,6 @@ func main() {
7571
os.Exit(0)
7672
}
7773

78-
// Env Vars
79-
operatorNamespace := envOrDie(
80-
envOperatorNamespace, "used to set annotation indicating which ALM operator manages a namespace")
81-
82-
operatorName := envOrDie(
83-
envOperatorName, "used to distinguish ALM operators of the same name")
84-
85-
annotation := map[string]string{
86-
ALMManagedAnnotationKey: fmt.Sprintf("%s.%s", operatorNamespace, operatorName),
87-
}
88-
8974
// Set log level to debug if `debug` flag set
9075
if *debug {
9176
log.SetLevel(log.DebugLevel)
@@ -104,12 +89,11 @@ func main() {
10489
opClient := operatorclient.NewClientFromConfig(*kubeConfigPath)
10590

10691
// Create a new instance of the operator.
107-
operator, err := olm.NewOperator(crClient, opClient, &install.StrategyResolver{}, *wakeupInterval, annotation, namespaces)
92+
operator, err := olm.NewOperator(crClient, opClient, &install.StrategyResolver{}, *wakeupInterval, namespaces)
10893

10994
if err != nil {
11095
log.Fatalf("error configuring operator: %s", err.Error())
11196
}
112-
defer operator.Cleanup()
11397

11498
// Serve a health check.
11599
http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) {

pkg/controller/annotator/annotator.go

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)