Skip to content
Closed
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
10 changes: 5 additions & 5 deletions examples/cvo-unmanage-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ metadata:
name: version
spec:
overrides:
- kind: Deployment
name: console-operator
namespace: openshift-console-operator
unmanaged: true
group: apps/v1
- kind: Deployment
name: console-operator
namespace: openshift-console-operator
unmanaged: true
group: apps/v1
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (
github.com/go-bindata/go-bindata v3.1.2+incompatible
github.com/go-test/deep v1.0.5
github.com/google/gofuzz v1.2.0 // indirect
github.com/open-cluster-management/api v0.0.0-20210527013639-a6845f2ebcb1
github.com/openshift/api v0.0.0-20210729103544-e4a0474d1519
github.com/openshift/build-machinery-go v0.0.0-20210712174854-1bb7fd1518d3
github.com/openshift/client-go v0.0.0-20210112160336-8889f8b15bd6
Expand Down
3 changes: 3 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,8 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+
github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME=
github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/open-cluster-management/api v0.0.0-20210527013639-a6845f2ebcb1 h1:AaFycHD9YOfFXe9C5VsYxKf4LKCXKSLZgK2DnFdHY4M=
github.com/open-cluster-management/api v0.0.0-20210527013639-a6845f2ebcb1/go.mod h1:ot+A1DWq+v1IV+e1S7nhIteYAmNByFgtazvzpoeAfRQ=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/openshift/api v0.0.0-20201214114959-164a2fb63b5f/go.mod h1:aqU5Cq+kqKKPbDMqxo9FojgDeSpNJI7iuskjXjtojDg=
Expand All @@ -418,6 +420,7 @@ github.com/openshift/api v0.0.0-20210325044225-ef3741adfc31/go.mod h1:aqU5Cq+kqK
github.com/openshift/api v0.0.0-20210729103544-e4a0474d1519 h1:g9hT0d7niFH2GD9NT8RHRq/45qDfNkRfEZw2A4HTrjc=
github.com/openshift/api v0.0.0-20210729103544-e4a0474d1519/go.mod h1:wf/SnvIX5Aq1NkALk26b2extjOGm3Q781gEgvr0+CDY=
github.com/openshift/build-machinery-go v0.0.0-20200917070002-f171684f77ab/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/build-machinery-go v0.0.0-20210115170933-e575b44a7a94/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/build-machinery-go v0.0.0-20210712174854-1bb7fd1518d3 h1:hYMLjavR8LrcCva788SxDqYjRc1k2w0LNGi7eX9vY5Y=
github.com/openshift/build-machinery-go v0.0.0-20210712174854-1bb7fd1518d3/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE=
github.com/openshift/client-go v0.0.0-20201214125552-e615e336eb49/go.mod h1:9/jG4I6sh+5QublJpZZ4Zs/P4/QCXMsQQ/K/058bSB8=
Expand Down
200 changes: 104 additions & 96 deletions manifests/03-rbac-role-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,79 +7,87 @@ metadata:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
rules:
- apiGroups:
- oauth.openshift.io
resources:
- oauthclients
verbs:
- get
- list
- update
- watch
resourceNames:
- console
- apiGroups:
- config.openshift.io
resources:
- oauths
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
- infrastructures
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
- proxies
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
- consoles
- consoles/status
- clusteroperators
- clusteroperators/status
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- operator.openshift.io
resources:
- consoles
- consoles/status
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- console.openshift.io
resources:
- consoleclidownloads
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- oauth.openshift.io
resources:
- oauthclients
verbs:
- get
- list
- update
- watch
resourceNames:
- console
- apiGroups:
- config.openshift.io
resources:
- oauths
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
- infrastructures
- ingresses
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
- proxies
verbs:
- get
- list
- watch
- apiGroups:
- config.openshift.io
resources:
- consoles
- consoles/status
- clusteroperators
- clusteroperators/status
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- operator.openshift.io
resources:
- consoles
- consoles/status
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- console.openshift.io
resources:
- consoleclidownloads
verbs:
- get
- list
- watch
- create
- update
- delete
- apiGroups:
- cluster.open-cluster-management.io
resources:
- managedclusters
verbs:
- get
- list
- watch
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -90,29 +98,29 @@ metadata:
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- apiGroups:
- operators.coreos.com
resources:
- subscriptions
resourceNames:
- web-terminal
verbs:
- get
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
- apiGroups:
- admissionregistration.k8s.io
resources:
- mutatingwebhookconfigurations
- validatingwebhookconfigurations
verbs:
- get
- apiGroups:
- operators.coreos.com
resources:
- subscriptions
resourceNames:
- web-terminal
verbs:
- get
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
8 changes: 8 additions & 0 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ const (
TrustedCABundleMountFile = "tls-ca-bundle.pem"
OCCLIDownloadsCustomResourceName = "oc-cli-downloads"
ODOCLIDownloadsCustomResourceName = "odo-cli-downloads"
HubClusterName = "local-cluster"
ManagedClusterLabel = "managed-cluster"
ManagedClusterConfigMapName = "managed-clusters"
ManagedClusterConfigMountDir = "/var/managed-cluster-config"
ManagedClusterConfigKey = "managed-clusters.yaml"
ManagedClusterAPIServerCAMountDir = "/var/managed-cluster-certs"
ManagedClusterAPIServerCAName = "managed-cluster-api-server-ca"
ManagedClusterAPIServerCAKey = "ca-bundle.crt"

ConsoleContainerPortName = "https"
ConsoleContainerPort = 443
Expand Down
4 changes: 2 additions & 2 deletions pkg/console/controllers/clidownloads/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ func NewCLIDownloadsSyncController(

return factory.New().
WithFilteredEventsInformers( // configs
controllersutil.NamesFilter(api.ConfigResourceName),
controllersutil.IncludeNamesFilter(api.ConfigResourceName),
operatorConfigInformer.Informer(),
).WithFilteredEventsInformers( // console resources
controllersutil.NamesFilter(api.OpenShiftConsoleDownloadsRouteName),
controllersutil.IncludeNamesFilter(api.OpenShiftConsoleDownloadsRouteName),
routeInformer.Informer(),
).WithInformers(
consoleCLIDownloadsInformers.Informer(),
Expand Down
4 changes: 2 additions & 2 deletions pkg/console/controllers/downloadsdeployment/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ func NewDownloadsDeploymentSyncController(
deploymentClient: deploymentClient,
}

configNameFilter := util.NamesFilter(api.ConfigResourceName)
downloadsNameFilter := util.NamesFilter(api.OpenShiftConsoleDownloadsDeploymentName)
configNameFilter := util.IncludeNamesFilter(api.ConfigResourceName)
downloadsNameFilter := util.IncludeNamesFilter(api.OpenShiftConsoleDownloadsDeploymentName)

return factory.New().
WithFilteredEventsInformers( // infrastructure configs
Expand Down
4 changes: 2 additions & 2 deletions pkg/console/controllers/healthcheck/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ func NewHealthCheckController(

return factory.New().
WithFilteredEventsInformers( // service
util.NamesFilter(api.TrustedCAConfigMapName, api.DefaultIngressCertConfigMapName),
util.IncludeNamesFilter(api.TrustedCAConfigMapName, api.OAuthServingCertConfigMapName),
configMapInformer.Informer(),
).WithFilteredEventsInformers( // route
util.NamesFilter(api.OpenShiftConsoleRouteName, api.OpenshiftConsoleCustomRouteName),
util.IncludeNamesFilter(api.OpenShiftConsoleRouteName, api.OpenshiftConsoleCustomRouteName),
routeInformer.Informer(),
).ResyncEvery(30*time.Second).WithSync(ctrl.Sync).
ToController("HealthCheckController", recorder.WithComponentSuffix("health-check-controller"))
Expand Down
Loading