Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions manifests/0000_50_olm_02-olm-operator.serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ rules:
verbs: ["watch", "list", "get", "create", "update", "patch", "delete", "deletecollection", "escalate", "bind"]
- nonResourceURLs: ["*"]
verbs: ["*"]
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- security.openshift.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
args:
- --namespace
- $(OPERATOR_NAMESPACE)
- --debug
- --writeStatusName
- operator-lifecycle-manager
- --writePackageServerStatusName
Expand Down Expand Up @@ -94,6 +95,8 @@ spec:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: olm-operator
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
resources:
Expand Down
3 changes: 3 additions & 0 deletions manifests/0000_50_olm_07-olm-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
args:
- --namespace
- $(OPERATOR_NAMESPACE)
- --debug
- --writeStatusName
- operator-lifecycle-manager
- --writePackageServerStatusName
Expand Down Expand Up @@ -93,6 +94,8 @@ spec:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: olm-operator
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
args:
- '--namespace'
- openshift-marketplace
- '--debug'
- --configmapServerImage=quay.io/operator-framework/configmap-operator-registry:latest
- --opmImage=quay.io/operator-framework/configmap-operator-registry:latest
- --util-image
Expand All @@ -73,6 +74,11 @@ spec:
- /profile-collector-cert/tls.crt
- --set-workload-user-id=false
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
env:
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8443
Expand All @@ -92,9 +98,6 @@ spec:
requests:
cpu: 10m
memory: 80Mi
env:
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
nodeSelector:
kubernetes.io/os: linux
tolerations:
Expand Down
9 changes: 6 additions & 3 deletions manifests/0000_50_olm_08-catalog-operator.deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
args:
- '--namespace'
- openshift-marketplace
- '--debug'
- --configmapServerImage=quay.io/operator-framework/configmap-operator-registry:latest
- --opmImage=quay.io/operator-framework/configmap-operator-registry:latest
- --util-image
Expand All @@ -72,6 +73,11 @@ spec:
- /profile-collector-cert/tls.crt
- --set-workload-user-id=false
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
env:
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8443
Expand All @@ -91,9 +97,6 @@ spec:
requests:
cpu: 10m
memory: 80Mi
env:
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
nodeSelector:
kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ rules:
verbs: ["watch", "list", "get", "create", "update", "patch", "delete", "deletecollection", "escalate", "bind"]
- nonResourceURLs: ["*"]
verbs: ["*"]
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- security.openshift.io
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
args:
- --namespace
- $(OPERATOR_NAMESPACE)
- --debug
- --writeStatusName
- operator-lifecycle-manager
- --writePackageServerStatusName
Expand Down Expand Up @@ -94,6 +95,8 @@ spec:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: olm-operator
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
args:
- --namespace
- $(OPERATOR_NAMESPACE)
- --debug
- --tls-cert
- /srv-cert/tls.crt
- --tls-key
Expand Down Expand Up @@ -89,6 +90,8 @@ spec:
fieldPath: metadata.namespace
- name: OPERATOR_NAME
value: olm-operator
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
args:
- '--namespace'
- openshift-marketplace
- '--debug'
- --configmapServerImage=quay.io/operator-framework/configmap-operator-registry:latest
- --opmImage=quay.io/operator-framework/configmap-operator-registry:latest
- --util-image
Expand All @@ -73,6 +74,11 @@ spec:
- /profile-collector-cert/tls.crt
- --set-workload-user-id=false
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
env:
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8443
Expand All @@ -92,9 +98,6 @@ spec:
requests:
cpu: 10m
memory: 80Mi
env:
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
nodeSelector:
kubernetes.io/os: linux
tolerations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ spec:
args:
- '--namespace'
- openshift-marketplace
- '--debug'
- --configmapServerImage=quay.io/operator-framework/configmap-operator-registry:latest
- --opmImage=quay.io/operator-framework/configmap-operator-registry:latest
- --util-image
Expand All @@ -72,6 +73,11 @@ spec:
- /profile-collector-cert/tls.crt
- --set-workload-user-id=false
image: quay.io/operator-framework/olm@sha256:de396b540b82219812061d0d753440d5655250c621c753ed1dc67d6154741607
env:
- name: CI
value: "true"
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8443
Expand All @@ -91,9 +97,6 @@ spec:
requests:
cpu: 10m
memory: 80Mi
env:
- name: RELEASE_VERSION
value: "0.0.1-snapshot"
nodeSelector:
kubernetes.io/os: linux
node-role.kubernetes.io/master: ""
Expand Down
12 changes: 6 additions & 6 deletions staging/operator-lifecycle-manager/cmd/catalog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,15 @@ func (o *options) run(ctx context.Context, logger *logrus.Logger) error {
o.catalogNamespace = catalogNamespaceEnvVarValue
}

config, err := clientcmd.BuildConfigFromFlags("", o.kubeconfig)
if err != nil {
return fmt.Errorf("error configuring client: %s", err.Error())
}

listenAndServe, err := server.GetListenAndServeFunc(
server.WithLogger(logger),
server.WithTLS(&o.tlsCertPath, &o.tlsKeyPath, &o.clientCAPath),
server.WithKubeConfig(config),
server.WithDebug(o.debug),
)
if err != nil {
Expand All @@ -71,12 +77,6 @@ func (o *options) run(ctx context.Context, logger *logrus.Logger) error {
logger.Error(err)
}
}()

// create a config client for operator status
config, err := clientcmd.BuildConfigFromFlags("", o.kubeconfig)
if err != nil {
return fmt.Errorf("error configuring client: %s", err.Error())
}
configClient, err := configv1client.NewForConfig(config)
if err != nil {
return fmt.Errorf("error configuring client: %s", err.Error())
Expand Down
19 changes: 12 additions & 7 deletions staging/operator-lifecycle-manager/cmd/olm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,18 @@ func main() {
}
logger.Infof("log level %s", logger.Level)

listenAndServe, err := server.GetListenAndServeFunc(server.WithLogger(logger), server.WithTLS(tlsCertPath, tlsKeyPath, clientCAPath), server.WithDebug(*debug))
mgr, err := Manager(ctx, *debug)
if err != nil {
logger.WithError(err).Fatal("error configuring controller manager")
}
config := mgr.GetConfig()

listenAndServe, err := server.GetListenAndServeFunc(
server.WithLogger(logger),
server.WithTLS(tlsCertPath, tlsKeyPath, clientCAPath),
server.WithKubeConfig(config),
server.WithDebug(*debug),
)
if err != nil {
logger.Fatalf("Error setting up health/metric/pprof service: %v", err)
}
Expand All @@ -134,12 +145,6 @@ func main() {
}
}()

mgr, err := Manager(ctx, *debug)
if err != nil {
logger.WithError(err).Fatal("error configuring controller manager")
}
config := mgr.GetConfig()

// create a config that validates we're creating objects with labels
validatingConfig := validatingroundtripper.Wrap(config, mgr.GetScheme())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ rules:
verbs: ["watch", "list", "get", "create", "update", "patch", "delete", "deletecollection", "escalate", "bind"]
- nonResourceURLs: ["*"]
verbs: ["*"]
- apiGroups:
- authentication.k8s.io
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
resources:
- subjectaccessreviews
verbs:
- create
---
kind: ServiceAccount
apiVersion: v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ operator_namespace_psa:
minKubeVersion: 1.11.0
writeStatusName: '""'
imagestream: false
debug: false
debug: true
installType: upstream
catalogGrpcPodPort: 50051

Expand Down
Loading