Skip to content
Merged
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
4 changes: 2 additions & 2 deletions api/operator/v1alpha1/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
)

var (
// IstioCSR enables the controller for istiocsr.operator.openshift.io resource,
// FeatureIstioCSR enables the controller for istiocsr.operator.openshift.io resource,
// which extends cert-manager-operator to deploy and manage the istio-csr agent.
// OpenShift Service Mesh facilitates the integration and istio-csr is an agent that
// allows Istio workload and control plane components to be secured using cert-manager.
Expand All @@ -14,7 +14,7 @@ var (
// https://github.com/openshift/enhancements/blob/master/enhancements/cert-manager/istio-csr-controller.md
FeatureIstioCSR featuregate.Feature = "IstioCSR"

// TrustManager enables the controller for trustmanagers.operator.openshift.io resource,
// FeatureTrustManager enables the controller for trustmanagers.operator.openshift.io resource,
// which extends cert-manager-operator to deploy and manage the trust-manager operand.
// trust-manager provides a way to manage trust bundles in OpenShift clusters.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,12 @@ spec:
spec:
clusterPermissions:
- rules:
- apiGroups:
- config.openshift.io
resources:
- featuregates
verbs:
- get
- apiGroups:
- ""
resources:
Expand Down
17 changes: 17 additions & 0 deletions config/rbac/featuregate_clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
app.kubernetes.io/name: featuregate-reader
app.kubernetes.io/instance: featuregate-reader
app.kubernetes.io/created-by: cert-manager-operator
app.kubernetes.io/part-of: cert-manager-operator
app.kubernetes.io/managed-by: kustomize
name: featuregate-reader
rules:
- apiGroups:
- config.openshift.io
resources:
- featuregates
verbs:
- get
18 changes: 18 additions & 0 deletions config/rbac/featuregate_clusterrole_binding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
app.kubernetes.io/name: featuregate-reader
app.kubernetes.io/instance: featuregate-reader
app.kubernetes.io/created-by: cert-manager-operator
app.kubernetes.io/part-of: cert-manager-operator
app.kubernetes.io/managed-by: kustomize
name: featuregate-reader
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: featuregate-reader
subjects:
- kind: ServiceAccount
name: controller-manager
namespace: system
4 changes: 4 additions & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ resources:
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
# RBAC for reading featuregates.config.openshift.io resource to determine
# feature enabling.
- featuregate_clusterrole.yaml
- featuregate_clusterrole_binding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"k8s.io/client-go/informers"
Expand All @@ -14,7 +14,7 @@ import (

"github.com/openshift/cert-manager-operator/pkg/operator/assets"
certmanoperatorinformers "github.com/openshift/cert-manager-operator/pkg/operator/informers/externalversions"
"github.com/openshift/cert-manager-operator/pkg/operator/optionalinformer"
"github.com/openshift/cert-manager-operator/pkg/operator/utils"
)

const (
Expand Down Expand Up @@ -51,7 +51,7 @@ func NewCertManagerCAInjectorStaticResourcesController(operatorClient v1helpers.

func NewCertManagerCAInjectorDeploymentController(operatorClient v1helpers.OperatorClientWithFinalizers,
certManagerOperatorInformers certmanoperatorinformers.SharedInformerFactory,
infraInformers optionalinformer.OptionalInformer[configinformers.SharedInformerFactory],
infraInformers utils.OptionalInformer[configinformers.SharedInformerFactory],
kubeClient kubernetes.Interface,
kubeInformersForTargetNamespace informers.SharedInformerFactory,
eventsRecorder events.Recorder, targetVersion string, versionRecorder status.VersionGetter,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"k8s.io/client-go/informers"
Expand All @@ -14,7 +14,7 @@ import (

"github.com/openshift/cert-manager-operator/pkg/operator/assets"
certmanoperatorinformers "github.com/openshift/cert-manager-operator/pkg/operator/informers/externalversions"
"github.com/openshift/cert-manager-operator/pkg/operator/optionalinformer"
"github.com/openshift/cert-manager-operator/pkg/operator/utils"
)

const (
Expand Down Expand Up @@ -70,11 +70,12 @@ func NewCertManagerControllerStaticResourcesController(operatorClient v1helpers.

func NewCertManagerControllerDeploymentController(operatorClient v1helpers.OperatorClientWithFinalizers,
certManagerOperatorInformers certmanoperatorinformers.SharedInformerFactory,
infraInformers optionalinformer.OptionalInformer[configinformers.SharedInformerFactory],
infraInformers utils.OptionalInformer[configinformers.SharedInformerFactory],
kubeClient kubernetes.Interface,
kubeInformersForTargetNamespace informers.SharedInformerFactory,
eventsRecorder events.Recorder, targetVersion string, versionRecorder status.VersionGetter, trustedCAConfigmapName, cloudCredentialsSecretName string) factory.Controller {
return newGenericDeploymentController(

certManagerControllerDeploymentControllerName,
targetVersion,
certManagerControllerDeploymentFile,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"k8s.io/client-go/informers"
Expand All @@ -12,7 +12,7 @@ import (
"github.com/openshift/library-go/pkg/operator/v1helpers"

certmanoperatorinformers "github.com/openshift/cert-manager-operator/pkg/operator/informers/externalversions"
"github.com/openshift/cert-manager-operator/pkg/operator/optionalinformer"
"github.com/openshift/cert-manager-operator/pkg/operator/utils"
)

type CertManagerControllerSet struct {
Expand All @@ -30,7 +30,7 @@ func NewCertManagerControllerSet(
kubeClient kubernetes.Interface,
kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces,
kubeInformersForTargetNamespace informers.SharedInformerFactory,
infraInformers optionalinformer.OptionalInformer[configinformers.SharedInformerFactory],
infraInformers utils.OptionalInformer[configinformers.SharedInformerFactory],
operatorClient v1helpers.OperatorClientWithFinalizers,
certManagerOperatorInformers certmanoperatorinformers.SharedInformerFactory,
kubeClientContainer *resourceapply.ClientHolder,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"k8s.io/client-go/informers"
Expand All @@ -14,7 +14,7 @@ import (

"github.com/openshift/cert-manager-operator/pkg/operator/assets"
certmanoperatorinformers "github.com/openshift/cert-manager-operator/pkg/operator/informers/externalversions"
"github.com/openshift/cert-manager-operator/pkg/operator/optionalinformer"
"github.com/openshift/cert-manager-operator/pkg/operator/utils"
)

const (
Expand Down Expand Up @@ -52,7 +52,7 @@ func NewCertManagerWebhookStaticResourcesController(operatorClient v1helpers.Ope

func NewCertManagerWebhookDeploymentController(operatorClient v1helpers.OperatorClientWithFinalizers,
certManagerOperatorInformers certmanoperatorinformers.SharedInformerFactory,
infraInformers optionalinformer.OptionalInformer[configinformers.SharedInformerFactory],
infraInformers utils.OptionalInformer[configinformers.SharedInformerFactory],
kubeclient kubernetes.Interface,
kubeInformersForTargetNamespace informers.SharedInformerFactory,
eventsRecorder events.Recorder, targetVersion string, versionRecorder status.VersionGetter, trustedCAConfigmapName, cloudCredentialsSecretName string) factory.Controller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package deployment
package certmanager

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

const (
operatorName = "cert-manager"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
appsv1 "k8s.io/api/apps/v1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"reflect"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"fmt"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"testing"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"encoding/json"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"k8s.io/client-go/informers"
Expand All @@ -14,14 +14,14 @@ import (

"github.com/openshift/cert-manager-operator/pkg/operator/assets"
certmanoperatorinformers "github.com/openshift/cert-manager-operator/pkg/operator/informers/externalversions"
"github.com/openshift/cert-manager-operator/pkg/operator/optionalinformer"
"github.com/openshift/cert-manager-operator/pkg/operator/utils"
)

func newGenericDeploymentController(
controllerName, targetVersion, deploymentFile string,
operatorClient v1helpers.OperatorClientWithFinalizers,
certManagerOperatorInformers certmanoperatorinformers.SharedInformerFactory,
infraInformers optionalinformer.OptionalInformer[configinformers.SharedInformerFactory],
infraInformers utils.OptionalInformer[configinformers.SharedInformerFactory],
kubeClient kubernetes.Interface,
kubeInformersForTargetNamespace informers.SharedInformerFactory,
eventsRecorder events.Recorder,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"os"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package deployment
package certmanager

import (
"os"
Expand Down
Loading