Skip to content

Commit

Permalink
pki_controller: set jira component for rotated certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
vrutkovs committed Feb 8, 2024
1 parent 0b3d2a5 commit 98acf32
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions pkg/controller/pki/pki_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
cnoclient "github.com/openshift/cluster-network-operator/pkg/client"
"github.com/openshift/cluster-network-operator/pkg/controller/eventrecorder"
"github.com/openshift/cluster-network-operator/pkg/controller/statusmanager"
"github.com/openshift/cluster-network-operator/pkg/names"

"github.com/openshift/library-go/pkg/controller/factory"
"github.com/openshift/library-go/pkg/crypto"
Expand Down Expand Up @@ -194,6 +195,7 @@ func newPKI(config *netopv1.OperatorPKI, clientset *kubernetes.Clientset, mgr ma
certrotation.RotatedSigningCASecret{
Namespace: config.Namespace,
Name: config.Name + "-ca",
JiraComponent: names.ClusterNetworkOperatorJiraComponent,
Validity: 10 * OneYear,
Refresh: 9 * OneYear,
Informer: inf.Core().V1().Secrets(),
Expand All @@ -204,16 +206,18 @@ func newPKI(config *netopv1.OperatorPKI, clientset *kubernetes.Clientset, mgr ma
certrotation.CABundleConfigMap{
Namespace: config.Namespace,
Name: config.Name + "-ca",
JiraComponent: names.ClusterNetworkOperatorJiraComponent,
Lister: inf.Core().V1().ConfigMaps().Lister(),
Informer: inf.Core().V1().ConfigMaps(),
Client: clientset.CoreV1(),
EventRecorder: &eventrecorder.LoggingRecorder{},
},
certrotation.RotatedSelfSignedCertKeySecret{
Namespace: config.Namespace,
Name: config.Name + "-cert",
Validity: OneYear / 2,
Refresh: OneYear / 4,
Namespace: config.Namespace,
Name: config.Name + "-cert",
JiraComponent: names.ClusterNetworkOperatorJiraComponent,
Validity: OneYear / 2,
Refresh: OneYear / 4,
CertCreator: &certrotation.ServingRotation{
Hostnames: func() []string { return []string{spec.TargetCert.CommonName} },

Expand Down

0 comments on commit 98acf32

Please sign in to comment.