Skip to content

Commit

Permalink
Merge pull request #706 from vakwetu/add_owner_to_cert_requests
Browse files Browse the repository at this point in the history
Add owner to cert requests
  • Loading branch information
openshift-merge-bot[bot] authored Mar 14, 2024
2 parents 6adaa5d + 74919cd commit 7323034
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 22 deletions.
2 changes: 1 addition & 1 deletion apis/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ require (
k8s.io/component-base v0.28.7 // indirect
k8s.io/klog/v2 v2.120.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240102154912-e7106e64919e // indirect
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions apis/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 h1:gbqbevonBh57eILzModw6mrkbwM0gQBEuevE/AaBsHY=
k8s.io/utils v0.0.0-20240310230437-4693a0247e57/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.16.5 h1:yr1cEJbX08xsTW6XEIzT13KHHmIyX8Umvme2cULvFZw=
sigs.k8s.io/controller-runtime v0.16.5/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ require (
github.com/openstack-k8s-operators/infra-operator/apis v0.3.1-0.20240308113717-eaf5876d69c3
github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240229174131-28e3aee56d91
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240310093110-b4b2614f40ba
github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240306153230-dc65ab49ebc0
github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240313084555-12e3d33d7a2d
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240306153230-dc65ab49ebc0
github.com/openstack-k8s-operators/lib-common/modules/test v0.3.1-0.20240306153230-dc65ab49ebc0
github.com/openstack-k8s-operators/manila-operator/api v0.3.1-0.20240305194401-0fda28a84acb
Expand All @@ -44,7 +44,7 @@ require (
k8s.io/api v0.28.7
k8s.io/apimachinery v0.28.7
k8s.io/client-go v0.28.7
k8s.io/utils v0.0.0-20240102154912-e7106e64919e
k8s.io/utils v0.0.0-20240310230437-4693a0247e57
sigs.k8s.io/controller-runtime v0.16.5
)

Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240229174131-2
github.com/openstack-k8s-operators/ironic-operator/api v0.3.1-0.20240229174131-28e3aee56d91/go.mod h1:Yac7wRClzl1/a7uBso4w8wq6Rjm+JLIouEsLre7VSDE=
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240310093110-b4b2614f40ba h1:0wfKrQMGwjh/kKTH/UpZGKk91HrnReYieHFG73OC+Vg=
github.com/openstack-k8s-operators/keystone-operator/api v0.3.1-0.20240310093110-b4b2614f40ba/go.mod h1:gB/IeXuvocAv0yNSf79U1lBHhbx6fdWUB501xFJ0l+A=
github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240306153230-dc65ab49ebc0 h1:5uv4LtcThS4hcfuecTJj+rXifbsPGcKRiyTvFXyDgNU=
github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240306153230-dc65ab49ebc0/go.mod h1:GGbtUK5VQ/BHIT3n0ia31bzNJaQIAANhzT/nC6pygbQ=
github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240313084555-12e3d33d7a2d h1:IjMM7Ci7JkrefHtuMGkiB/A+xWKPMxJHG9yjr2SGH08=
github.com/openstack-k8s-operators/lib-common/modules/certmanager v0.0.0-20240313084555-12e3d33d7a2d/go.mod h1:RV+rktKvegjYBQLuBKt8ax29UMqsU/D/sfSjQPr6XIs=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240306153230-dc65ab49ebc0 h1:1Q/9F3SAKvLN9vX+YxwaEB0WvBekj9eakQPoQbI1K6w=
github.com/openstack-k8s-operators/lib-common/modules/common v0.3.1-0.20240306153230-dc65ab49ebc0/go.mod h1:R2plZL2JdwDMJwv9+pkPmCB1Mww81J75G0MxRzi2Kug=
github.com/openstack-k8s-operators/lib-common/modules/openstack v0.3.1-0.20240306153230-dc65ab49ebc0 h1:HRoVOnK5nOSvYKU3Y2N8Ed2SikuRQYSRESeo/ILv0vM=
Expand Down Expand Up @@ -271,8 +271,8 @@ k8s.io/klog/v2 v2.120.1 h1:QXU6cPEOIslTGvZaXvFWiP9VKyeet3sawzTOvdXb4Vw=
k8s.io/klog/v2 v2.120.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag=
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e h1:eQ/4ljkx21sObifjzXwlPKpdGLrCfRziVtos3ofG/sQ=
k8s.io/utils v0.0.0-20240102154912-e7106e64919e/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
k8s.io/utils v0.0.0-20240310230437-4693a0247e57 h1:gbqbevonBh57eILzModw6mrkbwM0gQBEuevE/AaBsHY=
k8s.io/utils v0.0.0-20240310230437-4693a0247e57/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.16.5 h1:yr1cEJbX08xsTW6XEIzT13KHHmIyX8Umvme2cULvFZw=
sigs.k8s.io/controller-runtime v0.16.5/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
sigs.k8s.io/gateway-api v0.8.0 h1:isQQ3Jx2qFP7vaA3ls0846F0Amp9Eq14P08xbSwVbQg=
Expand Down
2 changes: 1 addition & 1 deletion pkg/openstack/ca.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func createRootCACertAndIssuer(
})
cert := certmanager.NewCertificate(caCertReq, 5)

ctrlResult, err := cert.CreateOrPatch(ctx, helper)
ctrlResult, err := cert.CreateOrPatch(ctx, helper, nil)
if err != nil {
instance.Status.Conditions.Set(condition.FalseCondition(
corev1.OpenStackControlPlaneCAReadyCondition,
Expand Down
9 changes: 6 additions & 3 deletions pkg/openstack/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ func EnsureEndpointConfig(
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return endpoints, ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down Expand Up @@ -327,7 +328,8 @@ func EnsureEndpointConfig(
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return endpoints, ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down Expand Up @@ -545,7 +547,8 @@ func (ed *EndpointDetail) CreateRoute(
certSecret, ctrlResult, err = certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/openstack/galera.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ func ReconcileGaleras(
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/openstack/memcached.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ func reconcileMemcached(
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return memcachedFailed, ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/openstack/neutron.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func ReconcileNeutron(ctx context.Context, instance *corev1beta1.OpenStackContro
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return ctrl.Result{}, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down
6 changes: 4 additions & 2 deletions pkg/openstack/nova.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl
helper,
nova.Namespace,
instance.Spec.Nova.Template.MetadataServiceTemplate.Override.Service.Labels,
tls.DefaultCAPrefix+string(service.EndpointInternal))
tls.DefaultCAPrefix+string(service.EndpointInternal),
nil)
if err != nil && !k8s_errors.IsNotFound(err) {
return ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand All @@ -195,7 +196,8 @@ func ReconcileNova(ctx context.Context, instance *corev1beta1.OpenStackControlPl
helper,
nova.Namespace,
cellTemplate.MetadataServiceTemplate.Override.Service.Labels,
tls.DefaultCAPrefix+string(service.EndpointInternal))
tls.DefaultCAPrefix+string(service.EndpointInternal),
nil)
if err != nil && !k8s_errors.IsNotFound(err) {
return ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down
9 changes: 6 additions & 3 deletions pkg/openstack/ovn.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ func ReconcileOVNDbClusters(ctx context.Context, instance *corev1beta1.OpenStack
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return false, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down Expand Up @@ -204,7 +205,8 @@ func ReconcileOVNNorthd(ctx context.Context, instance *corev1beta1.OpenStackCont
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return false, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down Expand Up @@ -295,7 +297,8 @@ func ReconcileOVNController(ctx context.Context, instance *corev1beta1.OpenStack
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return false, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down
3 changes: 2 additions & 1 deletion pkg/openstack/rabbitmq.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ func reconcileRabbitMQ(
certSecret, ctrlResult, err := certmanager.EnsureCert(
ctx,
helper,
certRequest)
certRequest,
nil)
if err != nil {
return mqFailed, ctrlResult, err
} else if (ctrlResult != ctrl.Result{}) {
Expand Down

0 comments on commit 7323034

Please sign in to comment.