Skip to content

Commit

Permalink
Merge pull request #423 from ComplianceAsCode/renovate/sigs.k8s.io-co…
Browse files Browse the repository at this point in the history
…ntroller-runtime-0.x

fix(deps): update module sigs.k8s.io/controller-runtime to v0.16.3
  • Loading branch information
openshift-ci[bot] authored Oct 26, 2023
2 parents 6dfae1c + e769b23 commit 0263e6d
Show file tree
Hide file tree
Showing 14 changed files with 215 additions and 69 deletions.
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
module github.com/ComplianceAsCode/compliance-operator

go 1.19
go 1.20

require (
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.28.0
github.com/wI2L/jsondiff v0.4.0
k8s.io/apimachinery v0.28.2
k8s.io/client-go v0.28.2
sigs.k8s.io/controller-runtime v0.16.1
k8s.io/apimachinery v0.28.3
k8s.io/client-go v0.28.3
sigs.k8s.io/controller-runtime v0.16.3
)

require (
Expand Down Expand Up @@ -75,10 +75,10 @@ require (
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1
k8s.io/api v0.28.2
k8s.io/apiextensions-apiserver v0.28.2
k8s.io/apiserver v0.28.2
k8s.io/component-base v0.28.2 // indirect
k8s.io/api v0.28.3
k8s.io/apiextensions-apiserver v0.28.3
k8s.io/apiserver v0.28.3
k8s.io/component-base v0.28.3 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230905202853-d090da108d2f // indirect
k8s.io/pod-security-admission v0.28.2
Expand Down
14 changes: 14 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -440,16 +440,28 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw=
k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg=
k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM=
k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc=
k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU=
k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg=
k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08=
k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc=
k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ=
k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU=
k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A=
k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8=
k8s.io/apiserver v0.28.2 h1:rBeYkLvF94Nku9XfXyUIirsVzCzJBs6jMn3NWeHieyI=
k8s.io/apiserver v0.28.2/go.mod h1:f7D5e8wH8MWcKD7azq6Csw9UN+CjdtXIVQUyUhrtb+E=
k8s.io/apiserver v0.28.3 h1:8Ov47O1cMyeDzTXz0rwcfIIGAP/dP7L8rWbEljRcg5w=
k8s.io/apiserver v0.28.3/go.mod h1:YIpM+9wngNAv8Ctt0rHG4vQuX/I5rvkEMtZtsxW2rNM=
k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY=
k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY=
k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4=
k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo=
k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E=
k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc=
k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI=
k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8=
k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg=
k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
k8s.io/kube-aggregator v0.28.2 h1:tCjAfB1p/v18yD2NpegNQRuahzyA/szFfcRARnpjDeo=
Expand All @@ -462,6 +474,8 @@ k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSn
k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
sigs.k8s.io/controller-runtime v0.16.1 h1:+15lzrmHsE0s2kNl0Dl8cTchI5Cs8qofo5PGcPrV9z0=
sigs.k8s.io/controller-runtime v0.16.1/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU=
sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4=
sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0=
sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI=
sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA=
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,11 @@ var _ = Describe("Testing compliancescan controller phases", func() {

// Set state to DONE
compliancescaninstance.Status.Phase = compv1alpha1.PhaseDone
compliancescaninstance.Spec.Debug = true
err := reconciler.Client.Status().Update(context.TODO(), compliancescaninstance)
Expect(err).To(BeNil())
compliancescaninstance.Spec.Debug = true
err = reconciler.Client.Update(context.TODO(), compliancescaninstance)
Expect(err).To(BeNil())
})
It("Should return success & not delete the scan pods or secrets (doDelete=false)", func() {
result, err := reconciler.phaseDoneHandler(handler, compliancescaninstance, logger, dontDelete)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package compliancesuite
import (
"context"
"encoding/json"

"github.com/ComplianceAsCode/compliance-operator/pkg/controller/metrics"
"github.com/ComplianceAsCode/compliance-operator/pkg/controller/metrics/metricsfakes"

Expand Down Expand Up @@ -207,7 +208,7 @@ var _ = Describe("ComplianceSuiteController", func() {

By("The remediation controller setting the applied status")
rem.Status.ApplicationState = compv1alpha1.RemediationApplied
err := reconciler.Client.Update(ctx, rem)
err := reconciler.Client.Status().Update(ctx, rem)
Expect(err).To(BeNil())

By("Running a second reconcile loop")
Expand All @@ -222,7 +223,7 @@ var _ = Describe("ComplianceSuiteController", func() {
Context("With spec.AutoApplyRemediations = true", func() {
BeforeEach(func() {
suite.Spec.AutoApplyRemediations = true
err := reconciler.Client.Status().Update(ctx, suite)
err := reconciler.Client.Update(ctx, suite)
Expect(err).To(BeNil())
})
Context("With ComplianceSuite and Scans not done", func() {
Expand Down Expand Up @@ -351,7 +352,7 @@ var _ = Describe("ComplianceSuiteController", func() {

By("The remediation controller setting the applied status")
rem.Status.ApplicationState = compv1alpha1.RemediationApplied
err := reconciler.Client.Update(ctx, rem)
err := reconciler.Client.Status().Update(ctx, rem)
Expect(err).To(BeNil())

By("the pool should be paused")
Expand All @@ -374,7 +375,7 @@ var _ = Describe("ComplianceSuiteController", func() {
Context("With spec.AutoApplyRemediations = true", func() {
BeforeEach(func() {
suite.Spec.AutoApplyRemediations = true
err := reconciler.Client.Status().Update(ctx, suite)
err := reconciler.Client.Update(ctx, suite)
Expect(err).To(BeNil())
})
Context("With ComplianceSuite and Scans not done", func() {
Expand Down Expand Up @@ -596,7 +597,7 @@ var _ = Describe("ComplianceSuiteController", func() {

By("The remediation controller setting the applied status")
rem.Status.ApplicationState = compv1alpha1.RemediationApplied
err := reconciler.Client.Update(ctx, rem)
err := reconciler.Client.Status().Update(ctx, rem)
Expect(err).To(BeNil())

By("the pool should be paused")
Expand Down Expand Up @@ -651,7 +652,7 @@ var _ = Describe("ComplianceSuiteController", func() {
Context("With spec.AutoApplyRemediations = true", func() {
BeforeEach(func() {
suite.Spec.AutoApplyRemediations = true
err := reconciler.Client.Status().Update(ctx, suite)
err := reconciler.Client.Update(ctx, suite)
Expect(err).To(BeNil())
})
Context("With ComplianceSuite and Scans not done", func() {
Expand Down Expand Up @@ -875,7 +876,7 @@ var _ = Describe("ComplianceSuiteController", func() {

By("The remediation controller setting the applied status")
rem.Status.ApplicationState = compv1alpha1.RemediationApplied
err := reconciler.Client.Update(ctx, rem)
err := reconciler.Client.Status().Update(ctx, rem)
Expect(err).To(BeNil())

By("the pool should be paused")
Expand Down Expand Up @@ -930,7 +931,7 @@ var _ = Describe("ComplianceSuiteController", func() {
Context("With spec.AutoApplyRemediations = true", func() {
BeforeEach(func() {
suite.Spec.AutoApplyRemediations = true
err := reconciler.Client.Status().Update(ctx, suite)
err := reconciler.Client.Update(ctx, suite)
Expect(err).To(BeNil())
})
Context("With ComplianceSuite and Scans not done", func() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ var _ = Describe("Testing scansettingbinding controller", func() {
pBundleRhcos *compv1alpha1.ProfileBundle
profRhcosE8 *compv1alpha1.Profile
tpRhcosE8 *compv1alpha1.TailoredProfile
scratchTP *compv1alpha1.TailoredProfile

setting *compv1alpha1.ScanSetting
ssb *compv1alpha1.ScanSettingBinding
Expand All @@ -43,6 +42,12 @@ var _ = Describe("Testing scansettingbinding controller", func() {

suite *compv1alpha1.ComplianceSuite
)
scratchTP := &compv1alpha1.TailoredProfile{
TypeMeta: v1.TypeMeta{
Kind: "TailoredProfile",
APIVersion: compv1alpha1.SchemeGroupVersion.String(),
},
}

BeforeEach(func() {
// Uncomment these lines if you need to debug the controller's output.
Expand Down Expand Up @@ -115,6 +120,10 @@ var _ = Describe("Testing scansettingbinding controller", func() {
}

scratchTP = &compv1alpha1.TailoredProfile{
TypeMeta: v1.TypeMeta{
Kind: "TailoredProfile",
APIVersion: compv1alpha1.SchemeGroupVersion.String(),
},
ObjectMeta: v1.ObjectMeta{
Name: "scratch-tp",
Namespace: common.GetComplianceOperatorNamespace(),
Expand Down Expand Up @@ -591,6 +600,10 @@ var _ = Describe("Testing scansettingbinding controller", func() {
Expect(updateErr).To(BeNil())

ssb = &compv1alpha1.ScanSettingBinding{
TypeMeta: v1.TypeMeta{
Kind: "ScanSettingBinding",
APIVersion: compv1alpha1.SchemeGroupVersion.String(),
},
ObjectMeta: v1.ObjectMeta{
Name: "tp-not-ready",
Namespace: common.GetComplianceOperatorNamespace(),
Expand Down Expand Up @@ -642,6 +655,10 @@ var _ = Describe("Testing scansettingbinding controller", func() {
Expect(updateErr).To(BeNil())

ssb = &compv1alpha1.ScanSettingBinding{
TypeMeta: v1.TypeMeta{
Kind: "ScanSettingBinding",
APIVersion: compv1alpha1.SchemeGroupVersion.String(),
},
ObjectMeta: v1.ObjectMeta{
Name: "tp-errored",
Namespace: common.GetComplianceOperatorNamespace(),
Expand Down
15 changes: 9 additions & 6 deletions vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ gopkg.in/yaml.v2
# gopkg.in/yaml.v3 v3.0.1
## explicit
gopkg.in/yaml.v3
# k8s.io/api v0.28.2
# k8s.io/api v0.28.3
## explicit; go 1.20
k8s.io/api/admission/v1
k8s.io/api/admission/v1beta1
Expand Down Expand Up @@ -747,7 +747,7 @@ k8s.io/api/scheduling/v1beta1
k8s.io/api/storage/v1
k8s.io/api/storage/v1alpha1
k8s.io/api/storage/v1beta1
# k8s.io/apiextensions-apiserver v0.28.2
# k8s.io/apiextensions-apiserver v0.28.3
## explicit; go 1.20
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
Expand All @@ -765,7 +765,7 @@ k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/apiextensio
k8s.io/apiextensions-apiserver/pkg/client/informers/externalversions/internalinterfaces
k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1
k8s.io/apiextensions-apiserver/pkg/client/listers/apiextensions/v1beta1
# k8s.io/apimachinery v0.28.2
# k8s.io/apimachinery v0.28.3
## explicit; go 1.20
k8s.io/apimachinery/pkg/api/equality
k8s.io/apimachinery/pkg/api/errors
Expand Down Expand Up @@ -818,11 +818,11 @@ k8s.io/apimachinery/pkg/version
k8s.io/apimachinery/pkg/watch
k8s.io/apimachinery/third_party/forked/golang/json
k8s.io/apimachinery/third_party/forked/golang/reflect
# k8s.io/apiserver v0.28.2
# k8s.io/apiserver v0.28.3
## explicit; go 1.20
k8s.io/apiserver/pkg/authentication/user
k8s.io/apiserver/pkg/storage/names
# k8s.io/client-go v0.28.2
# k8s.io/client-go v0.28.3
## explicit; go 1.20
k8s.io/client-go/applyconfigurations/admissionregistration/v1
k8s.io/client-go/applyconfigurations/admissionregistration/v1alpha1
Expand Down Expand Up @@ -1082,7 +1082,7 @@ k8s.io/client-go/util/homedir
k8s.io/client-go/util/keyutil
k8s.io/client-go/util/retry
k8s.io/client-go/util/workqueue
# k8s.io/component-base v0.28.2
# k8s.io/component-base v0.28.3
## explicit; go 1.20
k8s.io/component-base/config
k8s.io/component-base/config/v1alpha1
Expand Down Expand Up @@ -1134,7 +1134,7 @@ k8s.io/utils/pointer
k8s.io/utils/ptr
k8s.io/utils/strings/slices
k8s.io/utils/trace
# sigs.k8s.io/controller-runtime v0.16.1
# sigs.k8s.io/controller-runtime v0.16.3
## explicit; go 1.20
sigs.k8s.io/controller-runtime
sigs.k8s.io/controller-runtime/pkg/builder
Expand Down
Loading

0 comments on commit 0263e6d

Please sign in to comment.