Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump golang from 1.21-bullseye to 1.22-bullseye in /build/tooling #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
21 changes: 21 additions & 0 deletions apis/config/groups.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package config

import (
"flag"
"os"
)

var ConfigGroupName = getGroupFromEnvVars()

func init() {
flag.String("config-group-name", "config.gatekeeper.sh", "config group name")
}

func getGroupFromEnvVars() string {
value, exists := os.LookupEnv("CONFIG_GROUP_NAME")
if exists {
return value
}

return "config.gatekeeper.sh"
}
3 changes: 2 additions & 1 deletion apis/config/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ limitations under the License.
package v1alpha1

import (
"github.com/open-policy-agent/gatekeeper/v3/apis/config"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "config.gatekeeper.sh", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: config.ConfigGroupName, Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
21 changes: 21 additions & 0 deletions apis/expansion/groups.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package expansion

import (
"flag"
"os"
)

var ExpansionGroupName = getGroupNameFromEnvVars()

func init() {
flag.String("expansion-group-name", "expansion.gatekeeper.sh", "expansion group name")
}

func getGroupNameFromEnvVars() string {
value, exists := os.LookupEnv("EXPANSION_GROUP_NAME")
if exists {
return value
}

return "expansion.gatekeeper.sh"
}
3 changes: 2 additions & 1 deletion apis/expansion/v1beta1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ limitations under the License.
package v1beta1

import (
"github.com/open-policy-agent/gatekeeper/v3/apis/expansion"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "expansion.gatekeeper.sh", Version: "v1beta1"}
GroupVersion = schema.GroupVersion{Group: expansion.ExpansionGroupName, Version: "v1beta1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
21 changes: 21 additions & 0 deletions apis/mutations/group.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package mutations

import (
"flag"
"os"
)

var MutationGroupName string = getGroupFromEnvVars()

Check warning on line 8 in apis/mutations/group.go

View workflow job for this annotation

GitHub Actions / Lint

var-declaration: should omit type string from declaration of var MutationGroupName; it will be inferred from the right-hand side (revive)

Check warning on line 8 in apis/mutations/group.go

View workflow job for this annotation

GitHub Actions / Lint

var-declaration: should omit type string from declaration of var MutationGroupName; it will be inferred from the right-hand side (revive)

func init() {
flag.String("mutation-group-name", "mutations.gatekeeper.sh", "mutations group name")
}

func getGroupFromEnvVars() string {
value, exists := os.LookupEnv("MUTATIONS_GROUP_NAME")
if exists {
return value
}

return "mutations.gatekeeper.sh"
}
3 changes: 2 additions & 1 deletion apis/mutations/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ limitations under the License.
package v1

import (
"github.com/open-policy-agent/gatekeeper/v3/apis/mutations"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "mutations.gatekeeper.sh", Version: "v1"}
GroupVersion = schema.GroupVersion{Group: mutations.MutationGroupName, Version: "v1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
3 changes: 2 additions & 1 deletion apis/mutations/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ limitations under the License.
package v1alpha1

import (
"github.com/open-policy-agent/gatekeeper/v3/apis/mutations"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "mutations.gatekeeper.sh", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: mutations.MutationGroupName, Version: "v1alpha1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
3 changes: 2 additions & 1 deletion apis/mutations/v1beta1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ limitations under the License.
package v1beta1

import (
"github.com/open-policy-agent/gatekeeper/v3/apis/mutations"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "mutations.gatekeeper.sh", Version: "v1beta1"}
GroupVersion = schema.GroupVersion{Group: mutations.MutationGroupName, Version: "v1beta1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
31 changes: 31 additions & 0 deletions apis/status/groups.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package status

import (
"flag"
"os"
)

var StatusGroupName string = getStatusGroupNameFromEnvVars()
var ConstraintGroupName string = getConstraintGroupNameFromEnvVars()

Check warning on line 9 in apis/status/groups.go

View workflow job for this annotation

GitHub Actions / Lint

var-declaration: should omit type string from declaration of var ConstraintGroupName; it will be inferred from the right-hand side (revive)

Check warning on line 9 in apis/status/groups.go

View workflow job for this annotation

GitHub Actions / Lint

var-declaration: should omit type string from declaration of var ConstraintGroupName; it will be inferred from the right-hand side (revive)

func getStatusGroupNameFromEnvVars() string {
value, exists := os.LookupEnv("STATUS_GROUP_NAME")
if exists {
return value
}

return "status.gatekeeper.sh"
}

func getConstraintGroupNameFromEnvVars() string {
value, exists := os.LookupEnv("CONSTRAINTS_GROUP_NAME")
if exists {
return value
}

return "constraints.gatekeeper.sh"
}

func init() {
flag.String("status-group-name", "status.gatekeeper.sh", "Status group name")
}
5 changes: 4 additions & 1 deletion apis/status/v1beta1/constraintpodstatus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ limitations under the License.
package v1beta1

import (
"flag"
"strings"

"github.com/open-policy-agent/gatekeeper/v3/apis/status"
"github.com/open-policy-agent/gatekeeper/v3/pkg/operations"
"github.com/open-policy-agent/gatekeeper/v3/pkg/util"
corev1 "k8s.io/api/core/v1"
Expand All @@ -29,7 +31,7 @@ import (
)

// ConstraintsGroup is the API Group for Gatekeeper Constraints.
const ConstraintsGroup = "constraints.gatekeeper.sh"
var ConstraintsGroup = status.ConstraintGroupName

// ConstraintPodStatusStatus defines the observed state of ConstraintPodStatus.
type ConstraintPodStatusStatus struct {
Expand Down Expand Up @@ -75,6 +77,7 @@ type ConstraintPodStatusList struct {

func init() {
SchemeBuilder.Register(&ConstraintPodStatus{}, &ConstraintPodStatusList{})
flag.String("constarints-group-name", "constraints.gatekeeper.sh", "Constraints group name")
}

// NewConstraintStatusForPod returns a constraint status object
Expand Down
3 changes: 2 additions & 1 deletion apis/status/v1beta1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ limitations under the License.
package v1beta1

import (
"github.com/open-policy-agent/gatekeeper/v3/apis/status"
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects.
GroupVersion = schema.GroupVersion{Group: "status.gatekeeper.sh", Version: "v1beta1"}
GroupVersion = schema.GroupVersion{Group: status.StatusGroupName, Version: "v1beta1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme.
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
3 changes: 2 additions & 1 deletion apis/status/v1beta1/mutatorpodstatus_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package v1beta1
import (
"strings"

"github.com/open-policy-agent/gatekeeper/v3/apis/mutations"
mtypes "github.com/open-policy-agent/gatekeeper/v3/pkg/mutation/types"
"github.com/open-policy-agent/gatekeeper/v3/pkg/operations"
"github.com/open-policy-agent/gatekeeper/v3/pkg/util"
Expand All @@ -29,7 +30,7 @@ import (
)

// MutationsGroup is the API Group for Gatekeeper Mutators.
const MutationsGroup = "mutations.gatekeeper.sh"
var MutationsGroup = mutations.MutationGroupName

// MutatorPodStatusStatus defines the observed state of MutatorPodStatus.
type MutatorPodStatusStatus struct {
Expand Down
2 changes: 1 addition & 1 deletion build/tooling/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-bullseye@sha256:47fa179d4966a0950485ede2ef81567bb1cf62e1e87af07e9830e5c928d06cd0
FROM golang:1.22-bullseye@sha256:dcff0d950cb4648fec14ee51baa76bf27db3bb1e70a49f75421a8828db7b9910

RUN GO111MODULE=on go install sigs.k8s.io/controller-tools/cmd/[email protected]
RUN GO111MODULE=on go install k8s.io/code-generator/cmd/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions charts/gatekeeper/crds/assign-customresourcedefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: assign.mutations.gatekeeper.sh
name: assign.mutations.asafalg.sh
spec:
group: mutations.gatekeeper.sh
group: mutations.asafalg.sh
names:
kind: Assign
listKind: AssignList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: assignimage.mutations.gatekeeper.sh
name: assignimage.mutations.asafalg.sh
spec:
group: mutations.gatekeeper.sh
group: mutations.asafalg.sh
names:
kind: AssignImage
listKind: AssignImageList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: assignmetadata.mutations.gatekeeper.sh
name: assignmetadata.mutations.asafalg.sh
spec:
group: mutations.gatekeeper.sh
group: mutations.asafalg.sh
names:
kind: AssignMetadata
listKind: AssignMetadataList
Expand Down
4 changes: 2 additions & 2 deletions charts/gatekeeper/crds/config-customresourcedefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: configs.config.gatekeeper.sh
name: configs.config.asafalg.sh
spec:
group: config.gatekeeper.sh
group: config.asafalg.sh
names:
kind: Config
listKind: ConfigList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: constraintpodstatuses.status.gatekeeper.sh
name: constraintpodstatuses.status.asafalg.sh
spec:
group: status.gatekeeper.sh
group: status.asafalg.sh
names:
kind: ConstraintPodStatus
listKind: ConstraintPodStatusList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: constrainttemplates.templates.gatekeeper.sh
name: constrainttemplates.templates.asafalg.sh
spec:
group: templates.gatekeeper.sh
group: templates.asafalg.sh
names:
kind: ConstraintTemplate
listKind: ConstraintTemplateList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: constrainttemplatepodstatuses.status.gatekeeper.sh
name: constrainttemplatepodstatuses.status.asafalg.sh
spec:
group: status.gatekeeper.sh
group: status.asafalg.sh
names:
kind: ConstraintTemplatePodStatus
listKind: ConstraintTemplatePodStatusList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: expansiontemplate.expansion.gatekeeper.sh
name: expansiontemplate.expansion.asafalg.sh
spec:
group: expansion.gatekeeper.sh
group: expansion.asafalg.sh
names:
kind: ExpansionTemplate
listKind: ExpansionTemplateList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: expansiontemplatepodstatuses.status.gatekeeper.sh
name: expansiontemplatepodstatuses.status.asafalg.sh
spec:
group: status.gatekeeper.sh
group: status.asafalg.sh
names:
kind: ExpansionTemplatePodStatus
listKind: ExpansionTemplatePodStatusList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: modifyset.mutations.gatekeeper.sh
name: modifyset.mutations.asafalg.sh
spec:
group: mutations.gatekeeper.sh
group: mutations.asafalg.sh
names:
kind: ModifySet
listKind: ModifySetList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: mutatorpodstatuses.status.gatekeeper.sh
name: mutatorpodstatuses.status.asafalg.sh
spec:
group: status.gatekeeper.sh
group: status.asafalg.sh
names:
kind: MutatorPodStatus
listKind: MutatorPodStatusList
Expand Down
4 changes: 2 additions & 2 deletions charts/gatekeeper/crds/provider-customresourcedefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ metadata:
controller-gen.kubebuilder.io/version: v0.10.0
labels:
gatekeeper.sh/system: "yes"
name: providers.externaldata.gatekeeper.sh
name: providers.externaldata.asafalg.sh
spec:
group: externaldata.gatekeeper.sh
group: externaldata.asafalg.sh
names:
kind: Provider
listKind: ProviderList
Expand Down
Loading
Loading