diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6d4865a..a96838b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Kubebuilder DevContainer", - "image": "golang:1.25", + "image": "golang:1.26", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": { "moby": false, diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d3f5b7b --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,29 @@ +name: Lint + +on: + push: + pull_request: + +permissions: {} + +jobs: + lint: + permissions: + contents: read + name: Run on Ubuntu + runs-on: ubuntu-latest + steps: + - name: Clone the code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Setup Go + uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 + with: + go-version-file: go.mod + + - name: Check linter configuration + run: make lint-config + - name: Run linter + run: make lint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..27e82c8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: Tests + +on: + push: + pull_request: + +permissions: {} + +jobs: + test: + permissions: + contents: read + name: Run on Ubuntu + runs-on: ubuntu-latest + steps: + - name: Clone the code + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + persist-credentials: false + + - name: Setup Go + uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 + with: + go-version-file: go.mod + + - name: Running Tests + run: | + go mod tidy + make test diff --git a/.golangci.yml b/.golangci.yml index 1077e13..f5bca4a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -5,6 +5,7 @@ linters: default: none enable: - copyloopvar + - depguard - dupl - errcheck - ginkgolinter @@ -28,6 +29,12 @@ linters: logcheck: type: "module" description: Checks Go logging calls for Kubernetes logging conventions. + depguard: + rules: + forbid-sort-pkg: + deny: + - pkg: sort + desc: Should be replaced with slices package revive: rules: - name: comment-spacings @@ -35,6 +42,7 @@ linters: modernize: disable: - omitzero + - newexpr exclusions: generated: lax rules: diff --git a/Makefile b/Makefile index 54daf0b..c7ad74f 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ # Image URL to use all building/pushing image targets IMG ?= controller:latest +# YEAR defines the year value used for substituting the YEAR placeholder in the boilerplate header. +YEAR ?= $(shell date +%Y) # Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set) ifeq (,$(shell go env GOBIN)) @@ -73,6 +75,8 @@ test-with-report: manifests generate setup-envtest # TODO(user): To use a different vendor for e2e tests, modify the setup under 'tests/e2e'. # The default setup assumes Kind is pre-installed and builds/loads the Manager Docker image locally. +# kubectl kuberc is disabled by default for test isolation; enable with: +# - KUBECTL_KUBERC=true # CertManager is installed by default; skip with: # - CERT_MANAGER_INSTALL_SKIP=true KIND_CLUSTER ?= git-hubby-test-e2e @@ -226,12 +230,12 @@ GINKGO ?= $(LOCALBIN)/ginkgo ## Tool Versions KUSTOMIZE_VERSION ?= v5.8.1 -CONTROLLER_TOOLS_VERSION ?= v0.20.1 +CONTROLLER_TOOLS_VERSION ?= v0.21.0 -#ENVTEST_VERSION is the version of controller-runtime release branch to fetch the envtest setup script (i.e. release-0.20) +#ENVTEST_VERSION is the controller-runtime version to use for setup-envtest, derived from go.mod ENVTEST_VERSION ?= $(shell v='$(call gomodver,sigs.k8s.io/controller-runtime)'; \ [ -n "$$v" ] || { echo "Set ENVTEST_VERSION manually (controller-runtime replace has no tag)" >&2; exit 1; }; \ - printf '%s\n' "$$v" | sed -E 's/^v?([0-9]+)\.([0-9]+).*/release-\1.\2/') + printf '%s\n' "$$v") #ENVTEST_K8S_VERSION is the version of Kubernetes to use for setting up ENVTEST binaries (i.e. 1.31) ENVTEST_K8S_VERSION ?= $(shell v='$(call gomodver,k8s.io/api)'; \ diff --git a/PROJECT b/PROJECT index f1b03fd..ba6b0a5 100644 --- a/PROJECT +++ b/PROJECT @@ -2,7 +2,7 @@ # This file is used to track the info used to scaffold your project # and allow the plugins properly work. # More info: https://book.kubebuilder.io/reference/project-config.html -cliVersion: 4.13.1 +cliVersion: 4.15.0 domain: interhyp.de layout: - go.kubebuilder.io/v4 diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/autolinkspreset.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/autolinkspreset.go index b4f2f15..f214098 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/autolinkspreset.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/autolinkspreset.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -48,6 +51,47 @@ func AutolinksPreset(name, namespace string) *AutolinksPresetApplyConfiguration return b } +// ExtractAutolinksPresetFrom extracts the applied configuration owned by fieldManager from +// autolinksPreset for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// autolinksPreset must be a unmodified AutolinksPreset API object that was retrieved from the Kubernetes API. +// ExtractAutolinksPresetFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractAutolinksPresetFrom(autolinksPreset *apiv1alpha1.AutolinksPreset, fieldManager string, subresource string) (*AutolinksPresetApplyConfiguration, error) { + b := &AutolinksPresetApplyConfiguration{} + err := managedfields.ExtractInto(autolinksPreset, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.AutolinksPreset"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(autolinksPreset.Name) + b.WithNamespace(autolinksPreset.Namespace) + + b.WithKind("AutolinksPreset") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractAutolinksPreset extracts the applied configuration owned by fieldManager from +// autolinksPreset. If no managedFields are found in autolinksPreset for fieldManager, a +// AutolinksPresetApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// autolinksPreset must be a unmodified AutolinksPreset API object that was retrieved from the Kubernetes API. +// ExtractAutolinksPreset provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractAutolinksPreset(autolinksPreset *apiv1alpha1.AutolinksPreset, fieldManager string) (*AutolinksPresetApplyConfiguration, error) { + return ExtractAutolinksPresetFrom(autolinksPreset, fieldManager, "") +} + +// ExtractAutolinksPresetStatus extracts the applied configuration owned by fieldManager from +// autolinksPreset for the status subresource. +func ExtractAutolinksPresetStatus(autolinksPreset *apiv1alpha1.AutolinksPreset, fieldManager string) (*AutolinksPresetApplyConfiguration, error) { + return ExtractAutolinksPresetFrom(autolinksPreset, fieldManager, "status") +} + func (b AutolinksPresetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/codesecurityconfiguration.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/codesecurityconfiguration.go index 67bc04b..79a4529 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/codesecurityconfiguration.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/codesecurityconfiguration.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -48,6 +51,47 @@ func CodeSecurityConfiguration(name, namespace string) *CodeSecurityConfiguratio return b } +// ExtractCodeSecurityConfigurationFrom extracts the applied configuration owned by fieldManager from +// codeSecurityConfiguration for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// codeSecurityConfiguration must be a unmodified CodeSecurityConfiguration API object that was retrieved from the Kubernetes API. +// ExtractCodeSecurityConfigurationFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractCodeSecurityConfigurationFrom(codeSecurityConfiguration *apiv1alpha1.CodeSecurityConfiguration, fieldManager string, subresource string) (*CodeSecurityConfigurationApplyConfiguration, error) { + b := &CodeSecurityConfigurationApplyConfiguration{} + err := managedfields.ExtractInto(codeSecurityConfiguration, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfiguration"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(codeSecurityConfiguration.Name) + b.WithNamespace(codeSecurityConfiguration.Namespace) + + b.WithKind("CodeSecurityConfiguration") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractCodeSecurityConfiguration extracts the applied configuration owned by fieldManager from +// codeSecurityConfiguration. If no managedFields are found in codeSecurityConfiguration for fieldManager, a +// CodeSecurityConfigurationApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// codeSecurityConfiguration must be a unmodified CodeSecurityConfiguration API object that was retrieved from the Kubernetes API. +// ExtractCodeSecurityConfiguration provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractCodeSecurityConfiguration(codeSecurityConfiguration *apiv1alpha1.CodeSecurityConfiguration, fieldManager string) (*CodeSecurityConfigurationApplyConfiguration, error) { + return ExtractCodeSecurityConfigurationFrom(codeSecurityConfiguration, fieldManager, "") +} + +// ExtractCodeSecurityConfigurationStatus extracts the applied configuration owned by fieldManager from +// codeSecurityConfiguration for the status subresource. +func ExtractCodeSecurityConfigurationStatus(codeSecurityConfiguration *apiv1alpha1.CodeSecurityConfiguration, fieldManager string) (*CodeSecurityConfigurationApplyConfiguration, error) { + return ExtractCodeSecurityConfigurationFrom(codeSecurityConfiguration, fieldManager, "status") +} + func (b CodeSecurityConfigurationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/organization.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/organization.go index b6b5a2f..24ff9fb 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/organization.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/organization.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -48,6 +51,47 @@ func Organization(name, namespace string) *OrganizationApplyConfiguration { return b } +// ExtractOrganizationFrom extracts the applied configuration owned by fieldManager from +// organization for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// organization must be a unmodified Organization API object that was retrieved from the Kubernetes API. +// ExtractOrganizationFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOrganizationFrom(organization *apiv1alpha1.Organization, fieldManager string, subresource string) (*OrganizationApplyConfiguration, error) { + b := &OrganizationApplyConfiguration{} + err := managedfields.ExtractInto(organization, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.Organization"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(organization.Name) + b.WithNamespace(organization.Namespace) + + b.WithKind("Organization") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractOrganization extracts the applied configuration owned by fieldManager from +// organization. If no managedFields are found in organization for fieldManager, a +// OrganizationApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// organization must be a unmodified Organization API object that was retrieved from the Kubernetes API. +// ExtractOrganization provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractOrganization(organization *apiv1alpha1.Organization, fieldManager string) (*OrganizationApplyConfiguration, error) { + return ExtractOrganizationFrom(organization, fieldManager, "") +} + +// ExtractOrganizationStatus extracts the applied configuration owned by fieldManager from +// organization for the status subresource. +func ExtractOrganizationStatus(organization *apiv1alpha1.Organization, fieldManager string) (*OrganizationApplyConfiguration, error) { + return ExtractOrganizationFrom(organization, fieldManager, "status") +} + func (b OrganizationApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/repository.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/repository.go index a094dd7..ad07318 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/repository.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/repository.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -48,6 +51,47 @@ func Repository(name, namespace string) *RepositoryApplyConfiguration { return b } +// ExtractRepositoryFrom extracts the applied configuration owned by fieldManager from +// repository for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// repository must be a unmodified Repository API object that was retrieved from the Kubernetes API. +// ExtractRepositoryFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractRepositoryFrom(repository *apiv1alpha1.Repository, fieldManager string, subresource string) (*RepositoryApplyConfiguration, error) { + b := &RepositoryApplyConfiguration{} + err := managedfields.ExtractInto(repository, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.Repository"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(repository.Name) + b.WithNamespace(repository.Namespace) + + b.WithKind("Repository") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractRepository extracts the applied configuration owned by fieldManager from +// repository. If no managedFields are found in repository for fieldManager, a +// RepositoryApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// repository must be a unmodified Repository API object that was retrieved from the Kubernetes API. +// ExtractRepository provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractRepository(repository *apiv1alpha1.Repository, fieldManager string) (*RepositoryApplyConfiguration, error) { + return ExtractRepositoryFrom(repository, fieldManager, "") +} + +// ExtractRepositoryStatus extracts the applied configuration owned by fieldManager from +// repository for the status subresource. +func ExtractRepositoryStatus(repository *apiv1alpha1.Repository, fieldManager string) (*RepositoryApplyConfiguration, error) { + return ExtractRepositoryFrom(repository, fieldManager, "status") +} + func (b RepositoryApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/rulesetpreset.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/rulesetpreset.go index ce7f45e..7ad3a13 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/rulesetpreset.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/rulesetpreset.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -48,6 +51,47 @@ func RulesetPreset(name, namespace string) *RulesetPresetApplyConfiguration { return b } +// ExtractRulesetPresetFrom extracts the applied configuration owned by fieldManager from +// rulesetPreset for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// rulesetPreset must be a unmodified RulesetPreset API object that was retrieved from the Kubernetes API. +// ExtractRulesetPresetFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractRulesetPresetFrom(rulesetPreset *apiv1alpha1.RulesetPreset, fieldManager string, subresource string) (*RulesetPresetApplyConfiguration, error) { + b := &RulesetPresetApplyConfiguration{} + err := managedfields.ExtractInto(rulesetPreset, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.RulesetPreset"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(rulesetPreset.Name) + b.WithNamespace(rulesetPreset.Namespace) + + b.WithKind("RulesetPreset") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractRulesetPreset extracts the applied configuration owned by fieldManager from +// rulesetPreset. If no managedFields are found in rulesetPreset for fieldManager, a +// RulesetPresetApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// rulesetPreset must be a unmodified RulesetPreset API object that was retrieved from the Kubernetes API. +// ExtractRulesetPreset provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractRulesetPreset(rulesetPreset *apiv1alpha1.RulesetPreset, fieldManager string) (*RulesetPresetApplyConfiguration, error) { + return ExtractRulesetPresetFrom(rulesetPreset, fieldManager, "") +} + +// ExtractRulesetPresetStatus extracts the applied configuration owned by fieldManager from +// rulesetPreset for the status subresource. +func ExtractRulesetPresetStatus(rulesetPreset *apiv1alpha1.RulesetPreset, fieldManager string) (*RulesetPresetApplyConfiguration, error) { + return ExtractRulesetPresetFrom(rulesetPreset, fieldManager, "status") +} + func (b RulesetPresetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/team.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/team.go index ab20b23..7d438d1 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/team.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/team.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -46,6 +49,47 @@ func Team(name, namespace string) *TeamApplyConfiguration { return b } +// ExtractTeamFrom extracts the applied configuration owned by fieldManager from +// team for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// team must be a unmodified Team API object that was retrieved from the Kubernetes API. +// ExtractTeamFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractTeamFrom(team *apiv1alpha1.Team, fieldManager string, subresource string) (*TeamApplyConfiguration, error) { + b := &TeamApplyConfiguration{} + err := managedfields.ExtractInto(team, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.Team"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(team.Name) + b.WithNamespace(team.Namespace) + + b.WithKind("Team") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractTeam extracts the applied configuration owned by fieldManager from +// team. If no managedFields are found in team for fieldManager, a +// TeamApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// team must be a unmodified Team API object that was retrieved from the Kubernetes API. +// ExtractTeam provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractTeam(team *apiv1alpha1.Team, fieldManager string) (*TeamApplyConfiguration, error) { + return ExtractTeamFrom(team, fieldManager, "") +} + +// ExtractTeamStatus extracts the applied configuration owned by fieldManager from +// team for the status subresource. +func ExtractTeamStatus(team *apiv1alpha1.Team, fieldManager string) (*TeamApplyConfiguration, error) { + return ExtractTeamFrom(team, fieldManager, "status") +} + func (b TeamApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookignorepreset.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookignorepreset.go index 95ec3aa..4d0934f 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookignorepreset.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookignorepreset.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -48,6 +51,47 @@ func WebhookIgnorePreset(name, namespace string) *WebhookIgnorePresetApplyConfig return b } +// ExtractWebhookIgnorePresetFrom extracts the applied configuration owned by fieldManager from +// webhookIgnorePreset for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// webhookIgnorePreset must be a unmodified WebhookIgnorePreset API object that was retrieved from the Kubernetes API. +// ExtractWebhookIgnorePresetFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractWebhookIgnorePresetFrom(webhookIgnorePreset *apiv1alpha1.WebhookIgnorePreset, fieldManager string, subresource string) (*WebhookIgnorePresetApplyConfiguration, error) { + b := &WebhookIgnorePresetApplyConfiguration{} + err := managedfields.ExtractInto(webhookIgnorePreset, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.WebhookIgnorePreset"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(webhookIgnorePreset.Name) + b.WithNamespace(webhookIgnorePreset.Namespace) + + b.WithKind("WebhookIgnorePreset") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractWebhookIgnorePreset extracts the applied configuration owned by fieldManager from +// webhookIgnorePreset. If no managedFields are found in webhookIgnorePreset for fieldManager, a +// WebhookIgnorePresetApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// webhookIgnorePreset must be a unmodified WebhookIgnorePreset API object that was retrieved from the Kubernetes API. +// ExtractWebhookIgnorePreset provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractWebhookIgnorePreset(webhookIgnorePreset *apiv1alpha1.WebhookIgnorePreset, fieldManager string) (*WebhookIgnorePresetApplyConfiguration, error) { + return ExtractWebhookIgnorePresetFrom(webhookIgnorePreset, fieldManager, "") +} + +// ExtractWebhookIgnorePresetStatus extracts the applied configuration owned by fieldManager from +// webhookIgnorePreset for the status subresource. +func ExtractWebhookIgnorePresetStatus(webhookIgnorePreset *apiv1alpha1.WebhookIgnorePreset, fieldManager string) (*WebhookIgnorePresetApplyConfiguration, error) { + return ExtractWebhookIgnorePresetFrom(webhookIgnorePreset, fieldManager, "status") +} + func (b WebhookIgnorePresetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookpreset.go b/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookpreset.go index f547d8b..00d6578 100644 --- a/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookpreset.go +++ b/api/v1alpha1/applyconfiguration/api/v1alpha1/webhookpreset.go @@ -18,8 +18,11 @@ limitations under the License. package v1alpha1 import ( + apiv1alpha1 "github.com/Interhyp/git-hubby/api/v1alpha1" + internal "github.com/Interhyp/git-hubby/api/v1alpha1/applyconfiguration/internal" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" v1 "k8s.io/client-go/applyconfigurations/meta/v1" ) @@ -48,6 +51,47 @@ func WebhookPreset(name, namespace string) *WebhookPresetApplyConfiguration { return b } +// ExtractWebhookPresetFrom extracts the applied configuration owned by fieldManager from +// webhookPreset for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// webhookPreset must be a unmodified WebhookPreset API object that was retrieved from the Kubernetes API. +// ExtractWebhookPresetFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractWebhookPresetFrom(webhookPreset *apiv1alpha1.WebhookPreset, fieldManager string, subresource string) (*WebhookPresetApplyConfiguration, error) { + b := &WebhookPresetApplyConfiguration{} + err := managedfields.ExtractInto(webhookPreset, internal.Parser().Type("com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPreset"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(webhookPreset.Name) + b.WithNamespace(webhookPreset.Namespace) + + b.WithKind("WebhookPreset") + b.WithAPIVersion("github.interhyp.de/v1alpha1") + return b, nil +} + +// ExtractWebhookPreset extracts the applied configuration owned by fieldManager from +// webhookPreset. If no managedFields are found in webhookPreset for fieldManager, a +// WebhookPresetApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// webhookPreset must be a unmodified WebhookPreset API object that was retrieved from the Kubernetes API. +// ExtractWebhookPreset provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractWebhookPreset(webhookPreset *apiv1alpha1.WebhookPreset, fieldManager string) (*WebhookPresetApplyConfiguration, error) { + return ExtractWebhookPresetFrom(webhookPreset, fieldManager, "") +} + +// ExtractWebhookPresetStatus extracts the applied configuration owned by fieldManager from +// webhookPreset for the status subresource. +func ExtractWebhookPresetStatus(webhookPreset *apiv1alpha1.WebhookPreset, fieldManager string) (*WebhookPresetApplyConfiguration, error) { + return ExtractWebhookPresetFrom(webhookPreset, fieldManager, "status") +} + func (b WebhookPresetApplyConfiguration) IsApplyConfiguration() {} // WithKind sets the Kind field in the declarative configuration to the given value diff --git a/api/v1alpha1/applyconfiguration/internal/internal.go b/api/v1alpha1/applyconfiguration/internal/internal.go index e2d3a37..ec0f8ec 100644 --- a/api/v1alpha1/applyconfiguration/internal/internal.go +++ b/api/v1alpha1/applyconfiguration/internal/internal.go @@ -38,6 +38,1304 @@ func Parser() *typed.Parser { var parserOnce sync.Once var parser *typed.Parser var schemaYAML = typed.YAMLObject(`types: +- name: com.github.Interhyp.git-hubby.api.v1alpha1.About + map: + fields: + - name: description + type: + scalar: string + - name: topics + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.Topic + elementRelationship: atomic + - name: website + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.ActionsSettings + map: + fields: + - name: allowedActions + type: + scalar: string + - name: artifactAndLogRetentionDays + type: + scalar: numeric + default: 400 + - name: canApprovePullRequestReviews + type: + scalar: boolean + default: false + - name: defaultWorkflowPermissions + type: + scalar: string + default: read + - name: enabledRepositories + type: + scalar: string + default: none + - name: runnerGroups + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RunnerGroup + elementRelationship: atomic + - name: selectedAllowedActions + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.SelectedAllowedActions + - name: shaPinningRequired + type: + scalar: boolean + default: false +- name: com.github.Interhyp.git-hubby.api.v1alpha1.AttachableCodeSecurityConfigurationRef + map: + fields: + - name: attachmentScope + type: + scalar: string + - name: name + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.Autolink + map: + fields: + - name: isAlphanumeric + type: + scalar: boolean + default: false + - name: keyPrefix + type: + scalar: string + - name: urlTemplate + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.AutolinksPreset + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.AutolinksPresetSpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.AutolinksPresetStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.AutolinksPresetSpec + map: + fields: + - name: autolinks + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.Autolink + elementRelationship: atomic +- name: com.github.Interhyp.git-hubby.api.v1alpha1.AutolinksPresetStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type +- name: com.github.Interhyp.git-hubby.api.v1alpha1.BypassReviewer + map: + fields: + - name: reviewerId + type: + scalar: numeric + - name: reviewerName + type: + scalar: string + - name: reviewerType + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CodeScanningDefaultSetupOptions + map: + fields: + - name: runnerLabel + type: + scalar: string + - name: runnerType + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CodeScanningOptions + map: + fields: + - name: allowAdvanced + type: + scalar: boolean +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfiguration + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfigurationSpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfigurationStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfigurationRef + map: + fields: + - name: name + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfigurationSpec + map: + fields: + - name: advancedSecurity + type: + scalar: string + - name: codeScanningDefaultSetup + type: + scalar: string + - name: codeScanningDefaultSetupOptions + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.CodeScanningDefaultSetupOptions + - name: codeSecurity + type: + scalar: string + - name: code_scanning_delegated_alert_dismissal + type: + scalar: string + - name: code_scanning_options + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.CodeScanningOptions + - name: defaultForNewRepos + type: + scalar: string + - name: dependabotAlerts + type: + scalar: string + - name: dependabotSecurityUpdates + type: + scalar: string + - name: dependencyGraph + type: + scalar: string + - name: dependencyGraphAutosubmitAction + type: + scalar: string + - name: dependencyGraphAutosubmitActionOptions + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.DependencyGraphAutosubmitActionOptions + - name: description + type: + scalar: string + - name: enforcement + type: + scalar: string + - name: name + type: + scalar: string + - name: privateVulnerabilityReporting + type: + scalar: string + - name: secretProtection + type: + scalar: string + - name: secretScanning + type: + scalar: string + - name: secretScanningDelegatedAlertDismissal + type: + scalar: string + - name: secretScanningDelegatedBypass + type: + scalar: string + - name: secretScanningDelegatedBypassOptions + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.SecretScanningDelegatedBypassOptions + - name: secretScanningGenericSecrets + type: + scalar: string + - name: secretScanningNonProviderPatterns + type: + scalar: string + - name: secretScanningPushProtection + type: + scalar: string + - name: secretScanningValidityChecks + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfigurationStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CopilotCodeReviewRule + map: + fields: + - name: reviewDraftPullRequests + type: + scalar: boolean + default: true + - name: reviewOnPush + type: + scalar: boolean + default: true +- name: com.github.Interhyp.git-hubby.api.v1alpha1.CustomPropertyValue + map: + fields: + - name: propertyName + type: + scalar: string + - name: value + type: + scalar: string + - name: values + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: com.github.Interhyp.git-hubby.api.v1alpha1.DependencyGraphAutosubmitActionOptions + map: + fields: + - name: labeledRunners + type: + scalar: boolean +- name: com.github.Interhyp.git-hubby.api.v1alpha1.DeployKey + map: + fields: + - name: key + type: + scalar: string + - name: readOnly + type: + scalar: boolean + default: true + - name: title + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.GitHubAppConfig + map: + fields: + - name: credentialsSecretName + type: + scalar: string + - name: installationId + type: + scalar: numeric +- name: com.github.Interhyp.git-hubby.api.v1alpha1.MergeStrategy + map: + fields: + - name: type + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.OrgCustomProperty + map: + fields: + - name: allowedValues + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: defaultValue + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.OrgCustomPropertyDefaultValue + - name: description + type: + scalar: string + - name: propertyName + type: + scalar: string + - name: required + type: + scalar: boolean + default: false + - name: valueType + type: + scalar: string + - name: valuesEditableBy + type: + scalar: string + default: org_actors +- name: com.github.Interhyp.git-hubby.api.v1alpha1.OrgCustomPropertyDefaultValue + map: + fields: + - name: value + type: + scalar: string + - name: values + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: com.github.Interhyp.git-hubby.api.v1alpha1.Organization + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationSpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationRef + map: + fields: + - name: name + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationSpec + map: + fields: + - name: actionsSettings + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.ActionsSettings + - name: codeSecurityConfigurations + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.AttachableCodeSecurityConfigurationRef + elementRelationship: atomic + - name: customProperties + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.OrgCustomProperty + elementRelationship: atomic + - name: description + type: + scalar: string + - name: githubAppConfig + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.GitHubAppConfig + - name: githubAppInstallationId + type: + scalar: numeric + - name: location + type: + scalar: string + - name: login + type: + scalar: string + - name: memberSuffix + type: + scalar: string + default: "" + - name: name + type: + scalar: string + - name: plan + type: + scalar: string + default: enterprise + - name: rulesetPresets + type: + list: + elementType: + namedType: io.k8s.api.core.v1.LocalObjectReference + elementRelationship: atomic + - name: website + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: observedSubResourceGenerations + type: + map: + elementType: + scalar: numeric +- name: com.github.Interhyp.git-hubby.api.v1alpha1.PatternRule + map: + fields: + - name: negate + type: + scalar: boolean + default: false + - name: operator + type: + scalar: string + - name: pattern + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.PullRequestRule + map: + fields: + - name: allowedMergeMethods + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: dismissStaleReviewsOnPush + type: + scalar: boolean + default: false + - name: requireCodeOwnerReviews + type: + scalar: boolean + default: false + - name: requireLastPushApproval + type: + scalar: boolean + default: false + - name: requiredApprovingReviewCount + type: + scalar: numeric + - name: requiredReviewThreadResolution + type: + scalar: boolean + default: false +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RefNameCondition + map: + fields: + - name: exclude + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: include + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: com.github.Interhyp.git-hubby.api.v1alpha1.Repository + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RepositorySpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryNameCondition + map: + fields: + - name: exclude + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: include + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: protected + type: + scalar: boolean + default: false +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryPropertyCondition + map: + fields: + - name: exclude + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryPropertyTarget + elementRelationship: atomic + - name: include + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryPropertyTarget + elementRelationship: atomic +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryPropertyTarget + map: + fields: + - name: name + type: + scalar: string + - name: propertyValues + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: source + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RepositorySpec + map: + fields: + - name: about + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.About + - name: accessLevelForExternalWorkflows + type: + scalar: string + default: none + - name: actionsEnabled + type: + scalar: boolean + default: true + - name: allowedMergeStrategies + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.MergeStrategy + elementRelationship: atomic + default: + - type: merge + - type: rebase + - name: archived + type: + scalar: boolean + default: false + - name: attachedCodeSecurityConfiguration + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.CodeSecurityConfigurationRef + - name: autolinksPresets + type: + list: + elementType: + namedType: io.k8s.api.core.v1.LocalObjectReference + elementRelationship: atomic + - name: availableActionsRunnerGroups + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: customProperties + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.CustomPropertyValue + elementRelationship: atomic + - name: defaultBranch + type: + scalar: string + default: main + - name: deleteBranchOnMerge + type: + scalar: boolean + default: true + - name: deployKeys + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.DeployKey + elementRelationship: atomic + - name: hasDownloads + type: + scalar: boolean + default: false + - name: hasIssues + type: + scalar: boolean + default: true + - name: hasProjects + type: + scalar: boolean + default: false + - name: hasWiki + type: + scalar: boolean + default: false + - name: isTemplate + type: + scalar: boolean + default: false + - name: mergeCommitMessage + type: + scalar: string + default: PR_TITLE + - name: mergeCommitTitle + type: + scalar: string + default: MERGE_MESSAGE + - name: name + type: + scalar: string + - name: organizationRef + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationRef + - name: rulesetPresets + type: + list: + elementType: + namedType: io.k8s.api.core.v1.LocalObjectReference + elementRelationship: atomic + - name: visibility + type: + scalar: string + default: private + - name: webhookIgnorePresets + type: + list: + elementType: + namedType: io.k8s.api.core.v1.LocalObjectReference + elementRelationship: atomic + - name: webhookPresets + type: + list: + elementType: + namedType: io.k8s.api.core.v1.LocalObjectReference + elementRelationship: atomic +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: id + type: + scalar: numeric + - name: observedSubResourceGenerations + type: + map: + elementType: + scalar: numeric + - name: webhooks + type: + map: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RequiredStatusChecks + map: + fields: + - name: checks + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.StatusCheck + elementRelationship: atomic + - name: strictPolicy + type: + scalar: boolean + default: false +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RuleWorkflow + map: + fields: + - name: path + type: + scalar: string + - name: ref + type: + scalar: string + - name: repositoryName + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetBypassActor + map: + fields: + - name: actorId + type: + scalar: numeric + - name: actorSlug + type: + scalar: string + - name: actorType + type: + scalar: string + - name: bypassMode + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetConditions + map: + fields: + - name: refName + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RefNameCondition + - name: repositoryName + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryNameCondition + - name: repositoryProperty + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RepositoryPropertyCondition +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetEnforcement + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetPreset + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetPresetSpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetPresetStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetPresetSpec + map: + fields: + - name: bypassActors + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetBypassActor + elementRelationship: atomic + - name: conditions + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetConditions + - name: enforcement + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetEnforcement + - name: name + type: + scalar: string + - name: rules + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetRules + - name: target + type: + scalar: string + default: branch +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetPresetStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RulesetRules + map: + fields: + - name: branchNamePattern + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.PatternRule + - name: commitAuthorEmailPattern + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.PatternRule + - name: commitMessagePattern + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.PatternRule + - name: committerEmailPattern + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.PatternRule + - name: copilotReview + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.CopilotCodeReviewRule + - name: creation + type: + scalar: boolean + default: false + - name: deletion + type: + scalar: boolean + default: false + - name: nonFastForward + type: + scalar: boolean + default: false + - name: pullRequest + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.PullRequestRule + - name: requiredLinearHistory + type: + scalar: boolean + default: false + - name: requiredSignatures + type: + scalar: boolean + default: false + - name: requiredStatusChecks + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RequiredStatusChecks + - name: tagNamePattern + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.PatternRule + - name: update + type: + scalar: boolean + default: false + - name: workflows + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.WorkflowsRule +- name: com.github.Interhyp.git-hubby.api.v1alpha1.RunnerGroup + map: + fields: + - name: name + type: + scalar: string + - name: restrictedToWorkflows + type: + scalar: boolean + default: false + - name: selectedWorkflows + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: visibility + type: + scalar: string + default: all +- name: com.github.Interhyp.git-hubby.api.v1alpha1.SecretScanningDelegatedBypassOptions + map: + fields: + - name: reviewers + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.BypassReviewer + elementRelationship: atomic +- name: com.github.Interhyp.git-hubby.api.v1alpha1.SelectedAllowedActions + map: + fields: + - name: githubOwnedAllowed + type: + scalar: boolean + default: false + - name: patternsAllowed + type: + list: + elementType: + scalar: string + elementRelationship: atomic + default: [] + - name: verifiedAllowed + type: + scalar: boolean + default: false +- name: com.github.Interhyp.git-hubby.api.v1alpha1.StatusCheck + map: + fields: + - name: appSlug + type: + scalar: string + - name: context + type: + scalar: string + - name: integrationId + type: + scalar: numeric +- name: com.github.Interhyp.git-hubby.api.v1alpha1.Team + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.TeamSpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.TeamStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.TeamSpec + map: + fields: + - name: description + type: + scalar: string + - name: idpGroup + type: + scalar: string + - name: members + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: name + type: + scalar: string + - name: notificationSetting + type: + scalar: string + default: notifications_disabled + - name: organizationRefs + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationRef + elementRelationship: atomic + - name: organizationRoles + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: permission + type: + scalar: string + default: pull + - name: privacy + type: + scalar: string + default: closed +- name: com.github.Interhyp.git-hubby.api.v1alpha1.TeamStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: previousOrganizationRefs + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.OrganizationRef + elementRelationship: atomic + - name: slug + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.Topic + map: + fields: + - name: name + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookIgnorePreset + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookIgnorePresetSpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookIgnorePresetStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookIgnorePresetSpec + map: + fields: + - name: ignoreURLRegex + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookIgnorePresetStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPreset + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + - name: spec + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPresetSpec + - name: status + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPresetStatus +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPresetSecretSpec + map: + fields: + - name: key + type: + scalar: string + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPresetSpec + map: + fields: + - name: active + type: + scalar: boolean + default: true + - name: contentType + type: + scalar: string + - name: events + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: payloadUrl + type: + scalar: string + - name: secret + type: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPresetSecretSpec + - name: secretValue + type: + scalar: string + - name: sslVerify + type: + scalar: boolean + default: true +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookPresetStatus + map: + fields: + - name: conditions + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WebhookStatus + map: + fields: + - name: secretHash + type: + scalar: string +- name: com.github.Interhyp.git-hubby.api.v1alpha1.WorkflowsRule + map: + fields: + - name: doNotEnforceOnCreate + type: + scalar: boolean + default: false + - name: workflows + type: + list: + elementType: + namedType: com.github.Interhyp.git-hubby.api.v1alpha1.RuleWorkflow + elementRelationship: atomic +- name: io.k8s.api.core.v1.LocalObjectReference + map: + fields: + - name: name + type: + scalar: string + default: "" + elementRelationship: atomic +- name: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + map: + fields: + - name: lastTransitionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: message + type: + scalar: string + - name: observedGeneration + type: + scalar: numeric + - name: reason + type: + scalar: string + - name: status + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ConditionStatus + - name: type + type: + scalar: string +- name: io.k8s.apimachinery.pkg.apis.meta.v1.ConditionStatus + scalar: string +- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 + map: + elementType: + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry + map: + fields: + - name: apiVersion + type: + scalar: string + - name: fieldsType + type: + scalar: string + - name: fieldsV1 + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 + - name: manager + type: + scalar: string + - name: operation + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsOperationType + - name: subresource + type: + scalar: string + - name: time + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time +- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsOperationType + scalar: string +- name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + map: + fields: + - name: annotations + type: + map: + elementType: + scalar: string + - name: creationTimestamp + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: deletionGracePeriodSeconds + type: + scalar: numeric + - name: deletionTimestamp + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: finalizers + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: generateName + type: + scalar: string + - name: generation + type: + scalar: numeric + - name: labels + type: + map: + elementType: + scalar: string + - name: managedFields + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry + elementRelationship: atomic + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string + - name: ownerReferences + type: + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference + elementRelationship: associative + keys: + - uid + - name: resourceVersion + type: + scalar: string + - name: selfLink + type: + scalar: string + - name: uid + type: + namedType: io.k8s.apimachinery.pkg.types.UID +- name: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference + map: + fields: + - name: apiVersion + type: + scalar: string + - name: blockOwnerDeletion + type: + scalar: boolean + - name: controller + type: + scalar: boolean + - name: kind + type: + scalar: string + - name: name + type: + scalar: string + - name: uid + type: + namedType: io.k8s.apimachinery.pkg.types.UID + elementRelationship: atomic +- name: io.k8s.apimachinery.pkg.apis.meta.v1.Time + scalar: untyped +- name: io.k8s.apimachinery.pkg.types.UID + scalar: string - name: __untyped_atomic_ scalar: untyped list: diff --git a/api/v1alpha1/autolinkspreset_types.go b/api/v1alpha1/autolinkspreset_types.go index d90cb3f..b656ffc 100644 --- a/api/v1alpha1/autolinkspreset_types.go +++ b/api/v1alpha1/autolinkspreset_types.go @@ -1,23 +1,8 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -119,5 +104,8 @@ type AutolinksPresetList struct { } func init() { - SchemeBuilder.Register(&AutolinksPreset{}, &AutolinksPresetList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &AutolinksPreset{}, &AutolinksPresetList{}) + return nil + }) } diff --git a/api/v1alpha1/codesecurityconfiguration_types.go b/api/v1alpha1/codesecurityconfiguration_types.go index 60baf4b..e7a0a3f 100644 --- a/api/v1alpha1/codesecurityconfiguration_types.go +++ b/api/v1alpha1/codesecurityconfiguration_types.go @@ -1,23 +1,8 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -213,5 +198,8 @@ type CodeSecurityConfigurationList struct { } func init() { - SchemeBuilder.Register(&CodeSecurityConfiguration{}, &CodeSecurityConfigurationList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &CodeSecurityConfiguration{}, &CodeSecurityConfigurationList{}) + return nil + }) } diff --git a/api/v1alpha1/groupversion_info.go b/api/v1alpha1/groupversion_info.go index 9b87577..da5981b 100644 --- a/api/v1alpha1/groupversion_info.go +++ b/api/v1alpha1/groupversion_info.go @@ -1,19 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - // Package v1alpha1 contains API Schema definitions for the github v1alpha1 API group. // +kubebuilder:object:generate=true // +kubebuilder:ac:generate=true @@ -21,8 +5,9 @@ limitations under the License. package v1alpha1 import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" ) var ( @@ -34,7 +19,10 @@ var ( GroupVersion = SchemeGroupVersion // SchemeBuilder is used to add go types to the GroupVersionKind scheme. - SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} + SchemeBuilder = runtime.NewSchemeBuilder(func(scheme *runtime.Scheme) error { + metav1.AddToGroupVersion(scheme, SchemeGroupVersion) + return nil + }) // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme diff --git a/api/v1alpha1/organization_types.go b/api/v1alpha1/organization_types.go index 76ebcce..c2ae85e 100644 --- a/api/v1alpha1/organization_types.go +++ b/api/v1alpha1/organization_types.go @@ -1,24 +1,9 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // GitHubAppCredentials defines the GitHub App credentials configuration for authenticating with the GitHub API. @@ -447,5 +432,8 @@ type OrganizationList struct { } func init() { - SchemeBuilder.Register(&Organization{}, &OrganizationList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &Organization{}, &OrganizationList{}) + return nil + }) } diff --git a/api/v1alpha1/repository_types.go b/api/v1alpha1/repository_types.go index c9dd5ee..8393449 100644 --- a/api/v1alpha1/repository_types.go +++ b/api/v1alpha1/repository_types.go @@ -1,24 +1,9 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -372,5 +357,8 @@ type RepositoryList struct { } func init() { - SchemeBuilder.Register(&Repository{}, &RepositoryList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &Repository{}, &RepositoryList{}) + return nil + }) } diff --git a/api/v1alpha1/rulesetpreset_types.go b/api/v1alpha1/rulesetpreset_types.go index dbecec1..3841fde 100644 --- a/api/v1alpha1/rulesetpreset_types.go +++ b/api/v1alpha1/rulesetpreset_types.go @@ -1,23 +1,8 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -562,5 +547,8 @@ type RulesetPresetList struct { } func init() { - SchemeBuilder.Register(&RulesetPreset{}, &RulesetPresetList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &RulesetPreset{}, &RulesetPresetList{}) + return nil + }) } diff --git a/api/v1alpha1/team_types.go b/api/v1alpha1/team_types.go index b84d01a..6b52a0c 100644 --- a/api/v1alpha1/team_types.go +++ b/api/v1alpha1/team_types.go @@ -1,22 +1,8 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -175,5 +161,8 @@ type TeamList struct { } func init() { - SchemeBuilder.Register(&Team{}, &TeamList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &Team{}, &TeamList{}) + return nil + }) } diff --git a/api/v1alpha1/webhookignorepreset_types.go b/api/v1alpha1/webhookignorepreset_types.go index 0192bdb..06adae2 100644 --- a/api/v1alpha1/webhookignorepreset_types.go +++ b/api/v1alpha1/webhookignorepreset_types.go @@ -1,23 +1,8 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -95,5 +80,8 @@ type WebhookIgnorePresetList struct { } func init() { - SchemeBuilder.Register(&WebhookIgnorePreset{}, &WebhookIgnorePresetList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &WebhookIgnorePreset{}, &WebhookIgnorePresetList{}) + return nil + }) } diff --git a/api/v1alpha1/webhookpreset_types.go b/api/v1alpha1/webhookpreset_types.go index 3842de5..3f58b51 100644 --- a/api/v1alpha1/webhookpreset_types.go +++ b/api/v1alpha1/webhookpreset_types.go @@ -1,23 +1,8 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" ) // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! @@ -166,5 +151,8 @@ type WebhookPresetList struct { } func init() { - SchemeBuilder.Register(&WebhookPreset{}, &WebhookPresetList{}) + SchemeBuilder.Register(func(s *runtime.Scheme) error { + s.AddKnownTypes(SchemeGroupVersion, &WebhookPreset{}, &WebhookPresetList{}) + return nil + }) } diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index d2db3a7..a31cc14 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -23,7 +23,7 @@ package v1alpha1 import ( corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. diff --git a/cmd/main.go b/cmd/main.go index 7d953e6..37556bf 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,19 +1,3 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package main import ( @@ -266,7 +250,7 @@ func main() { // Metrics endpoint is enabled in 'config/default/kustomization.yaml'. The Metrics options configure the server. // More info: - // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.23.3/pkg/metrics/server + // - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.24.1/pkg/metrics/server // - https://book.kubebuilder.io/reference/metrics.html metricsServerOptions := metricsserver.Options{ BindAddress: metricsAddr, @@ -278,7 +262,7 @@ func main() { // FilterProvider is used to protect the metrics endpoint with authn/authz. // These configurations ensure that only authorized users and service accounts // can access the metrics endpoint. The RBAC are configured in 'config/rbac/kustomization.yaml'. More info: - // https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.23.3/pkg/metrics/filters#WithAuthenticationAndAuthorization + // https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.24.1/pkg/metrics/filters#WithAuthenticationAndAuthorization metricsServerOptions.FilterProvider = filters.WithAuthenticationAndAuthorization } diff --git a/config/crd/bases/github.interhyp.de_autolinkspresets.yaml b/config/crd/bases/github.interhyp.de_autolinkspresets.yaml index d880f9d..2a03aec 100644 --- a/config/crd/bases/github.interhyp.de_autolinkspresets.yaml +++ b/config/crd/bases/github.interhyp.de_autolinkspresets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: autolinkspresets.github.interhyp.de spec: group: github.interhyp.de diff --git a/config/crd/bases/github.interhyp.de_codesecurityconfigurations.yaml b/config/crd/bases/github.interhyp.de_codesecurityconfigurations.yaml index 3c88cd2..8af9387 100644 --- a/config/crd/bases/github.interhyp.de_codesecurityconfigurations.yaml +++ b/config/crd/bases/github.interhyp.de_codesecurityconfigurations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: codesecurityconfigurations.github.interhyp.de spec: group: github.interhyp.de diff --git a/config/crd/bases/github.interhyp.de_organizations.yaml b/config/crd/bases/github.interhyp.de_organizations.yaml index 0ca2719..b7f4a5a 100644 --- a/config/crd/bases/github.interhyp.de_organizations.yaml +++ b/config/crd/bases/github.interhyp.de_organizations.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: organizations.github.interhyp.de spec: group: github.interhyp.de diff --git a/config/crd/bases/github.interhyp.de_repositories.yaml b/config/crd/bases/github.interhyp.de_repositories.yaml index 91b633a..819aaa7 100644 --- a/config/crd/bases/github.interhyp.de_repositories.yaml +++ b/config/crd/bases/github.interhyp.de_repositories.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: repositories.github.interhyp.de spec: group: github.interhyp.de diff --git a/config/crd/bases/github.interhyp.de_rulesetpresets.yaml b/config/crd/bases/github.interhyp.de_rulesetpresets.yaml index ea09d38..c15b44c 100644 --- a/config/crd/bases/github.interhyp.de_rulesetpresets.yaml +++ b/config/crd/bases/github.interhyp.de_rulesetpresets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: rulesetpresets.github.interhyp.de spec: group: github.interhyp.de diff --git a/config/crd/bases/github.interhyp.de_teams.yaml b/config/crd/bases/github.interhyp.de_teams.yaml index de7f065..1e9ed48 100644 --- a/config/crd/bases/github.interhyp.de_teams.yaml +++ b/config/crd/bases/github.interhyp.de_teams.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: teams.github.interhyp.de spec: group: github.interhyp.de diff --git a/config/crd/bases/github.interhyp.de_webhookignorepresets.yaml b/config/crd/bases/github.interhyp.de_webhookignorepresets.yaml index fa8ef3f..9a88a83 100644 --- a/config/crd/bases/github.interhyp.de_webhookignorepresets.yaml +++ b/config/crd/bases/github.interhyp.de_webhookignorepresets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: webhookignorepresets.github.interhyp.de spec: group: github.interhyp.de diff --git a/config/crd/bases/github.interhyp.de_webhookpresets.yaml b/config/crd/bases/github.interhyp.de_webhookpresets.yaml index 83d1df7..d00b118 100644 --- a/config/crd/bases/github.interhyp.de_webhookpresets.yaml +++ b/config/crd/bases/github.interhyp.de_webhookpresets.yaml @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.20.1 + controller-gen.kubebuilder.io/version: v0.21.0 name: webhookpresets.github.interhyp.de spec: group: github.interhyp.de diff --git a/docs/crds.md b/docs/crds.md index 963b5f2..c4fe0f3 100644 --- a/docs/crds.md +++ b/docs/crds.md @@ -8,19 +8,6 @@ Package v1alpha1 contains API Schema definitions for the github v1alpha1 API group. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - ### Resource Types - [AutolinksPreset](#autolinkspreset) - [AutolinksPresetList](#autolinkspresetlist) diff --git a/go.mod b/go.mod index cb5483a..fc39c1a 100644 --- a/go.mod +++ b/go.mod @@ -15,32 +15,33 @@ require ( go.elastic.co/ecszap v1.0.3 go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 go.uber.org/zap v1.28.0 + golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 golang.org/x/text v0.37.0 golang.org/x/time v0.15.0 - sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 + k8s.io/api v0.36.0 + sigs.k8s.io/structured-merge-diff/v6 v6.3.2 ) // dependencies managed by kubebuilder require ( - github.com/onsi/ginkgo/v2 v2.27.2 - github.com/onsi/gomega v1.38.2 - k8s.io/api v0.35.0 - k8s.io/apimachinery v0.35.0 - k8s.io/client-go v0.35.0 - k8s.io/utils v0.0.0-20251222233032-718f0e51e6d2 - sigs.k8s.io/controller-runtime v0.23.3 + github.com/onsi/ginkgo/v2 v2.27.4 + github.com/onsi/gomega v1.39.0 + k8s.io/apimachinery v0.36.0 + k8s.io/client-go v0.36.0 + k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect + sigs.k8s.io/controller-runtime v0.24.1 ) require ( - cel.dev/expr v0.24.0 // indirect + cel.dev/expr v0.25.1 // indirect github.com/Masterminds/semver/v3 v3.4.0 // indirect github.com/antlr4-go/antlr/v4 v4.13.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.12.2 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/emicklei/go-restful/v3 v3.13.0 // indirect github.com/evanphx/json-patch/v5 v5.9.11 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.9.0 // indirect @@ -53,13 +54,12 @@ require ( github.com/go-openapi/swag v0.23.0 // indirect github.com/go-task/slim-sprig/v3 v3.0.0 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect - github.com/google/btree v1.1.3 // indirect github.com/google/cel-go v0.26.0 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-github/v84 v84.0.0 // indirect github.com/google/go-querystring v1.2.0 // indirect github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -68,48 +68,48 @@ require ( github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.23.2 // indirect github.com/prometheus/client_model v0.6.2 // indirect - github.com/prometheus/common v0.66.1 // indirect - github.com/prometheus/procfs v0.16.1 // indirect - github.com/spf13/cobra v1.10.0 // indirect + github.com/prometheus/common v0.67.5 // indirect + github.com/prometheus/procfs v0.19.2 // indirect + github.com/spf13/cobra v1.10.2 // indirect github.com/spf13/pflag v1.0.9 // indirect github.com/stoewer/go-strcase v1.3.0 // indirect github.com/x448/float16 v0.8.4 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/otel v1.43.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 // indirect go.opentelemetry.io/otel/metric v1.43.0 // indirect go.opentelemetry.io/otel/sdk v1.43.0 // indirect go.opentelemetry.io/otel/trace v1.43.0 // indirect - go.opentelemetry.io/proto/otlp v1.5.0 // indirect + go.opentelemetry.io/proto/otlp v1.9.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.yaml.in/yaml/v2 v2.4.3 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect golang.org/x/mod v0.35.0 // indirect golang.org/x/net v0.53.0 // indirect - golang.org/x/oauth2 v0.30.0 // indirect + golang.org/x/oauth2 v0.34.0 // indirect golang.org/x/sync v0.20.0 // indirect golang.org/x/sys v0.43.0 // indirect golang.org/x/term v0.42.0 // indirect golang.org/x/tools v0.44.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a // indirect - google.golang.org/grpc v1.72.2 // indirect - google.golang.org/protobuf v1.36.8 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 // indirect + google.golang.org/grpc v1.79.3 // indirect + google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af // indirect gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.35.0 // indirect - k8s.io/apiserver v0.35.0 // indirect - k8s.io/component-base v0.35.0 // indirect - k8s.io/klog/v2 v2.130.1 // indirect - k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 // indirect - sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 // indirect + k8s.io/apiextensions-apiserver v0.36.0 // indirect + k8s.io/apiserver v0.36.0 // indirect + k8s.io/component-base v0.36.0 // indirect + k8s.io/klog/v2 v2.140.0 // indirect + k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a // indirect + k8s.io/streaming v0.36.0 // indirect + sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/yaml v1.6.0 // indirect diff --git a/go.sum b/go.sum index d2d8787..e5eba9d 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= -cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4= +cel.dev/expr v0.25.1/go.mod h1:hrXvqGP6G6gyx8UAHSHJ5RGk//1Oj5nXQ2NI02Nrsg4= github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0= github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= github.com/PuerkitoBio/rehttp v1.4.0 h1:rIN7A2s+O9fmHUM1vUcInvlHj9Ysql4hE+Y0wcl/xk8= @@ -16,18 +16,19 @@ github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bradleyfalzon/ghinstallation/v2 v2.18.0 h1:WPqnN6NS9XvYlOgZQAIseN7Z1uAiE+UxgDKlW7FvFuU= github.com/bradleyfalzon/ghinstallation/v2 v2.18.0/go.mod h1:gpoSwwWc4biE49F7n+roCcpkEkZ1Qr9soZ2ESvMiouU= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= -github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.13.0 h1:C4Bl2xDndpU6nJ4bc1jXd+uTmYPVUwkD6bFY/oTyCes= +github.com/emicklei/go-restful/v3 v3.13.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/ettle/strcase v0.2.0 h1:fGNiVF21fHXpX1niBgk0aROov1LagYsOwV/xqKDKR/Q= github.com/ettle/strcase v0.2.0/go.mod h1:DajmHElDSaX76ITe3/VHVyMin4LWSJN5Z909Wp+ED1A= github.com/evanphx/json-patch v0.5.2 h1:xVCHIVMUu1wtM/VkR9jVZ45N3FhZfYMMYGorLCR8P3k= @@ -73,8 +74,6 @@ github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXe github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/btree v1.1.3 h1:CVpQJjYgC4VbzxeGVHfvZrv1ctoYCAI8vbl07Fcxlyg= -github.com/google/btree v1.1.3/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/cel-go v0.26.0 h1:DPGjXackMpJWH680oGY4lZhYjIameYmR+/6RBdDGmaI= github.com/google/cel-go v0.26.0/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/gnostic-models v0.7.0 h1:qwTtogB15McXDaNqTZdzPJRHvaVJlAl+HVQnLmJEJxo= @@ -95,8 +94,8 @@ github.com/google/pprof v0.0.0-20250403155104-27863c87afa6 h1:BHT72Gu3keYf3ZEu2J github.com/google/pprof v0.0.0-20250403155104-27863c87afa6/go.mod h1:boTsfXsheKC2y+lKOCMpSfarhxDeIzfZG1jqGcPl3cA= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7 h1:X+2YciYSxvMQK0UZ7sg45ZVabVZBeBuvMkmuI2V3Fak= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.7/go.mod h1:lW34nIZuQ8UDPdkon5fmfp2l3+ZkQ2me/+oecHYLOII= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0= @@ -132,28 +131,28 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/onsi/ginkgo/v2 v2.27.2 h1:LzwLj0b89qtIy6SSASkzlNvX6WktqurSHwkk2ipF/Ns= -github.com/onsi/ginkgo/v2 v2.27.2/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= -github.com/onsi/gomega v1.38.2 h1:eZCjf2xjZAqe+LeWvKb5weQ+NcPwX84kqJ0cZNxok2A= -github.com/onsi/gomega v1.38.2/go.mod h1:W2MJcYxRGV63b418Ai34Ud0hEdTVXq9NW9+Sx6uXf3k= +github.com/onsi/ginkgo/v2 v2.27.4 h1:fcEcQW/A++6aZAZQNUmNjvA9PSOzefMJBerHJ4t8v8Y= +github.com/onsi/ginkgo/v2 v2.27.4/go.mod h1:ArE1D/XhNXBXCBkKOLkbsb2c81dQHCRcF5zwn/ykDRo= +github.com/onsi/gomega v1.39.0 h1:y2ROC3hKFmQZJNFeGAMeHZKkjBL65mIZcvrLQBF9k6Q= +github.com/onsi/gomega v1.39.0/go.mod h1:ZCU1pkQcXDO5Sl9/VVEGlDyp+zm0m1cmeG5TOzLgdh4= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= -github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= -github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= -github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= -github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= +github.com/prometheus/common v0.67.5 h1:pIgK94WWlQt1WLwAC5j2ynLaBRDiinoAb86HZHTUGI4= +github.com/prometheus/common v0.67.5/go.mod h1:SjE/0MzDEEAyrdr5Gqc6G+sXI67maCxzaT3A2+HqjUw= +github.com/prometheus/procfs v0.19.2 h1:zUMhqEW66Ex7OXIiDkll3tl9a1ZdilUOd/F6ZXw4Vws= +github.com/prometheus/procfs v0.19.2/go.mod h1:M0aotyiemPhBCM0z5w87kL22CxfcH05ZpYlu+b4J7mw= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/spf13/cobra v1.10.0 h1:a5/WeUlSDCvV5a45ljW2ZFtV0bTDpkfSAj3uqB6Sc+0= -github.com/spf13/cobra v1.10.0/go.mod h1:9dhySC7dnTtEiqzmqfkLj47BslqLCUPMXjG2lj/NgoE= -github.com/spf13/pflag v1.0.8/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/cobra v1.10.2 h1:DMTTonx5m65Ic0GOoRY2c16WCbHxOOw6xxezuLaBpcU= +github.com/spf13/cobra v1.10.2/go.mod h1:7C1pvHqHw5A4vrJfjNwvOdzYu0Gml16OCs2GRiTUUS4= github.com/spf13/pflag v1.0.9 h1:9exaQaMOCwffKiiiYk6/BndUBv+iRViNW+4lEMi0PvY= github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stoewer/go-strcase v1.3.0 h1:g0eASXYtp+yvN9fK8sH94oCIk0fau9uV1/ZdJ0AVEzs= @@ -188,10 +187,10 @@ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0 h1:CqXxU8V go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.68.0/go.mod h1:BuhAPThV8PBHBvg8ZzZ/Ok3idOdhWIodywz2xEcRbJo= go.opentelemetry.io/otel v1.43.0 h1:mYIM03dnh5zfN7HautFE4ieIig9amkNANT+xcVxAj9I= go.opentelemetry.io/otel v1.43.0/go.mod h1:JuG+u74mvjvcm8vj8pI5XiHy1zDeoCS2LB1spIq7Ay0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 h1:QKdN8ly8zEMrByybbQgv8cWBcdAarwmIPZ6FThrWXJs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0/go.mod h1:bTdK1nhqF76qiPoCCdyFIV+N/sRHYXYCTQc+3VCi3MI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0 h1:DvJDOPmSWQHWywQS6lKL+pb8s3gBLOZUtw4N+mavW1I= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.40.0/go.mod h1:EtekO9DEJb4/jRyN4v4Qjc2yA7AtfCBuz2FynRUWTXs= go.opentelemetry.io/otel/metric v1.43.0 h1:d7638QeInOnuwOONPp4JAOGfbCEpYb+K6DVWvdxGzgM= go.opentelemetry.io/otel/metric v1.43.0/go.mod h1:RDnPtIxvqlgO8GRW18W6Z/4P462ldprJtfxHxyKd2PY= go.opentelemetry.io/otel/sdk v1.43.0 h1:pi5mE86i5rTeLXqoF/hhiBtUNcrAGHLKQdhg4h4V9Dg= @@ -200,8 +199,8 @@ go.opentelemetry.io/otel/sdk/metric v1.43.0 h1:S88dyqXjJkuBNLeMcVPRFXpRw2fuwdvfC go.opentelemetry.io/otel/sdk/metric v1.43.0/go.mod h1:C/RJtwSEJ5hzTiUz5pXF1kILHStzb9zFlIEe85bhj6A= go.opentelemetry.io/otel/trace v1.43.0 h1:BkNrHpup+4k4w+ZZ86CZoHHEkohws8AY+WTX09nk+3A= go.opentelemetry.io/otel/trace v1.43.0/go.mod h1:/QJhyVBUUswCphDVxq+8mld+AvhXZLhe+8WVFxiFff0= -go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4= -go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4= +go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A= +go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -212,15 +211,15 @@ go.yaml.in/yaml/v2 v2.4.3 h1:6gvOSjQoTB3vt1l+CU+tSyi/HOjfOjRLJ4YwYZGwRO0= go.yaml.in/yaml/v2 v2.4.3/go.mod h1:zSxWcmIDjOzPXpjlTTbAsKokqkDNAVtZO0WOMiT90s8= go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc= go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8= -golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= +golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93 h1:fQsdNF2N+/YewlRZiricy4P1iimyPKZ/xwniHj8Q2a0= +golang.org/x/exp v0.0.0-20251219203646-944ab1f22d93/go.mod h1:EPRbTFwzwjXj9NpYyyrvenVh9Y+GFeEvMNh7Xuz7xgU= golang.org/x/mod v0.35.0 h1:Ww1D637e6Pg+Zb2KrWfHQUnH2dQRLBQyAtpr/haaJeM= golang.org/x/mod v0.35.0/go.mod h1:+GwiRhIInF8wPm+4AoT6L0FA1QWAad3OMdTRx4tFYlU= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= -golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI= -golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU= +golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= +golang.org/x/oauth2 v0.34.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -240,14 +239,16 @@ golang.org/x/tools v0.44.0 h1:UP4ajHPIcuMjT1GqzDWRlalUEoY+uzoZKnhOjbIPD2c= golang.org/x/tools v0.44.0/go.mod h1:KA0AfVErSdxRZIsOVipbv3rQhVXTnlU6UhKxHd1seDI= gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb h1:p31xT4yrYrSM/G4Sn2+TNUkVhFCbG9y8itM2S6Th950= -google.golang.org/genproto/googleapis/api v0.0.0-20250303144028-a0af3efb3deb/go.mod h1:jbe3Bkdp+Dh2IrslsFCklNhweNTBgSYanP1UXhJDhKg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a h1:v2PbRU4K3llS09c7zodFpNePeamkAwG3mPrAery9VeE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250528174236-200df99c418a/go.mod h1:qQ0YXyHHx3XkvlzUtpXDkS29lDSafHMZBAZDc03LQ3A= -google.golang.org/grpc v1.72.2 h1:TdbGzwb82ty4OusHWepvFWGLgIbNo1/SUynEN0ssqv8= -google.golang.org/grpc v1.72.2/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM= -google.golang.org/protobuf v1.36.8 h1:xHScyCOEuuwZEc6UtSOvPbAT4zRh0xcNRYekJwfqyMc= -google.golang.org/protobuf v1.36.8/go.mod h1:fuxRtAxBytpl4zzqUh6/eyUujkJdNiuEkXntxiD/uRU= +gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= +gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409 h1:merA0rdPeUV3YIIfHHcH4qBkiQAc1nfCKSI7lB4cV2M= +google.golang.org/genproto/googleapis/api v0.0.0-20260128011058-8636f8732409/go.mod h1:fl8J1IvUjCilwZzQowmw2b7HQB2eAuYBabMXzWurF+I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409 h1:H86B94AW+VfJWDqFeEbBPhEtHzJwJfTbgE2lZa54ZAQ= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260128011058-8636f8732409/go.mod h1:j9x/tPzZkyxcgEFkiKEEGxfvyumM01BEtsW8xzOahRQ= +google.golang.org/grpc v1.79.3 h1:sybAEdRIEtvcD68Gx7dmnwjZKlyfuc61Dyo9pGXXkKE= +google.golang.org/grpc v1.79.3/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af h1:+5/Sw3GsDNlEmu7TfklWKPdQ0Ykja5VEmq2i817+jbI= +google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= @@ -258,33 +259,35 @@ gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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.35.0 h1:iBAU5LTyBI9vw3L5glmat1njFK34srdLmktWwLTprlY= -k8s.io/api v0.35.0/go.mod h1:AQ0SNTzm4ZAczM03QH42c7l3bih1TbAXYo0DkF8ktnA= -k8s.io/apiextensions-apiserver v0.35.0 h1:3xHk2rTOdWXXJM+RDQZJvdx0yEOgC0FgQ1PlJatA5T4= -k8s.io/apiextensions-apiserver v0.35.0/go.mod h1:E1Ahk9SADaLQ4qtzYFkwUqusXTcaV2uw3l14aqpL2LU= -k8s.io/apimachinery v0.35.0 h1:Z2L3IHvPVv/MJ7xRxHEtk6GoJElaAqDCCU0S6ncYok8= -k8s.io/apimachinery v0.35.0/go.mod h1:jQCgFZFR1F4Ik7hvr2g84RTJSZegBc8yHgFWKn//hns= -k8s.io/apiserver v0.35.0 h1:CUGo5o+7hW9GcAEF3x3usT3fX4f9r8xmgQeCBDaOgX4= -k8s.io/apiserver v0.35.0/go.mod h1:QUy1U4+PrzbJaM3XGu2tQ7U9A4udRRo5cyxkFX0GEds= -k8s.io/client-go v0.35.0 h1:IAW0ifFbfQQwQmga0UdoH0yvdqrbwMdq9vIFEhRpxBE= -k8s.io/client-go v0.35.0/go.mod h1:q2E5AAyqcbeLGPdoRB+Nxe3KYTfPce1Dnu1myQdqz9o= -k8s.io/component-base v0.35.0 h1:+yBrOhzri2S1BVqyVSvcM3PtPyx5GUxCK2tinZz1G94= -k8s.io/component-base v0.35.0/go.mod h1:85SCX4UCa6SCFt6p3IKAPej7jSnF3L8EbfSyMZayJR0= -k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= -k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912 h1:Y3gxNAuB0OBLImH611+UDZcmKS3g6CthxToOb37KgwE= -k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ= -k8s.io/utils v0.0.0-20251222233032-718f0e51e6d2 h1:OfgiEo21hGiwx1oJUU5MpEaeOEg6coWndBkZF/lkFuE= -k8s.io/utils v0.0.0-20251222233032-718f0e51e6d2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= -sigs.k8s.io/controller-runtime v0.23.3 h1:VjB/vhoPoA9l1kEKZHBMnQF33tdCLQKJtydy4iqwZ80= -sigs.k8s.io/controller-runtime v0.23.3/go.mod h1:B6COOxKptp+YaUT5q4l6LqUJTRpizbgf9KSRNdQGns0= +k8s.io/api v0.36.0 h1:SgqDhZzHdOtMk40xVSvCXkP9ME0H05hPM3p9AB1kL80= +k8s.io/api v0.36.0/go.mod h1:m1LVrGPNYax5NBHdO+QuAedXyuzTt4RryI/qnmNvs34= +k8s.io/apiextensions-apiserver v0.36.0 h1:Wt7E8J+VBCbj4FjiBfDTK/neXDDjyJVJc7xfuOHImZ0= +k8s.io/apiextensions-apiserver v0.36.0/go.mod h1:kGDjH0msuiIB3tgsYRV0kS9GqpMYMUsQ3GHv7TApyug= +k8s.io/apimachinery v0.36.0 h1:jZyPzhd5Z+3h9vJLt0z9XdzW9VzNzWAUw+P1xZ9PXtQ= +k8s.io/apimachinery v0.36.0/go.mod h1:FklypaRJt6n5wUIwWXIP6GJlIpUizTgfo1T/As+Tyxc= +k8s.io/apiserver v0.36.0 h1:Jg5OFAENUACByUCg15CmhZAYrr5ZyJ+jodyA1mHl3YE= +k8s.io/apiserver v0.36.0/go.mod h1:mHvwdHf+qKEm+1/hYm756SV+oREOKSPnsjagOpx6Vho= +k8s.io/client-go v0.36.0 h1:pOYi7C4RHChYjMiHpZSpSbIM6ZxVbRXBy7CuiIwqA3c= +k8s.io/client-go v0.36.0/go.mod h1:ZKKcpwF0aLYfkHFCjillCKaTK/yBkEDHTDXCFY6AS9Y= +k8s.io/component-base v0.36.0 h1:hFjEktssxiJhrK1zfybkH4kJOi8iZuF+mIDCqS5+jRo= +k8s.io/component-base v0.36.0/go.mod h1:JZvIfcNHk+uck+8LhJzhSBtydWXaZNQwX2OdL+Mnwsk= +k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= +k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a h1:xCeOEAOoGYl2jnJoHkC3hkbPJgdATINPMAxaynU2Ovg= +k8s.io/kube-openapi v0.0.0-20260317180543-43fb72c5454a/go.mod h1:uGBT7iTA6c6MvqUvSXIaYZo9ukscABYi2btjhvgKGZ0= +k8s.io/streaming v0.36.0 h1:agnTxU+NFulUrtYzXUGKO3ndEa8jKwht1Kwn9nu9x+4= +k8s.io/streaming v0.36.0/go.mod h1:z6fV3D+NVkoeqRMtWwlUZK6U17SY/LqNzOxWL6GyR/s= +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU= +k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 h1:hSfpvjjTQXQY2Fol2CS0QHMNs/WI1MOSGzCm1KhM5ec= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= +sigs.k8s.io/controller-runtime v0.24.1 h1:miPEwrmirImAvgME1L9qebGHrOnGJoVmVdtOU9fRfo4= +sigs.k8s.io/controller-runtime v0.24.1/go.mod h1:vFkfY5fGt5xAC/sKb8IBFKgWPNKG9OUG29dR8Y2wImw= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482 h1:2WOzJpHUBVrrkDjU4KBT8n5LDcj824eX0I5UKcgeRUs= -sigs.k8s.io/structured-merge-diff/v6 v6.3.2-0.20260122202528-d9cc6641c482/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2 h1:kwVWMx5yS1CrnFWA/2QHyRVJ8jM6dBA80uLmm0wJkk8= +sigs.k8s.io/structured-merge-diff/v6 v6.3.2/go.mod h1:M3W8sfWvn2HhQDIbGWj3S099YozAsymCo/wrT5ohRUE= sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/internal/controller/organization_controller.go b/internal/controller/organization_controller.go index 277930f..5f69d5f 100644 --- a/internal/controller/organization_controller.go +++ b/internal/controller/organization_controller.go @@ -1,19 +1,3 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package controller import ( diff --git a/internal/controller/organization_controller_test.go b/internal/controller/organization_controller_test.go index 926dc96..3d6101d 100644 --- a/internal/controller/organization_controller_test.go +++ b/internal/controller/organization_controller_test.go @@ -1,17 +1,3 @@ -/* -Copyright 2025. -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ package controller import ( diff --git a/internal/controller/repository_controller.go b/internal/controller/repository_controller.go index 093dd34..b50d0e2 100644 --- a/internal/controller/repository_controller.go +++ b/internal/controller/repository_controller.go @@ -1,19 +1,3 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package controller import ( diff --git a/internal/controller/repository_controller_test.go b/internal/controller/repository_controller_test.go index 02faa2d..39d2285 100644 --- a/internal/controller/repository_controller_test.go +++ b/internal/controller/repository_controller_test.go @@ -1,19 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package controller import ( diff --git a/internal/controller/suite_test.go b/internal/controller/suite_test.go index 743e9ff..c6d1c90 100644 --- a/internal/controller/suite_test.go +++ b/internal/controller/suite_test.go @@ -1,19 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package controller import ( @@ -68,7 +52,7 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, - ErrorIfCRDPathMissing: true, + ErrorIfCRDPathMissing: false, } // Retrieve the first found binary directory to allow running tests from IDEs diff --git a/internal/controller/team_controller.go b/internal/controller/team_controller.go index add0f04..7a48170 100644 --- a/internal/controller/team_controller.go +++ b/internal/controller/team_controller.go @@ -1,19 +1,3 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package controller import ( diff --git a/internal/controller/team_controller_test.go b/internal/controller/team_controller_test.go index 18b5509..e1e842e 100644 --- a/internal/controller/team_controller_test.go +++ b/internal/controller/team_controller_test.go @@ -1,19 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package controller import ( diff --git a/internal/webhook/v1alpha1/organization_webhook.go b/internal/webhook/v1alpha1/organization_webhook.go index 1a830ee..f7b1b63 100644 --- a/internal/webhook/v1alpha1/organization_webhook.go +++ b/internal/webhook/v1alpha1/organization_webhook.go @@ -1,19 +1,3 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( diff --git a/internal/webhook/v1alpha1/organization_webhook_test.go b/internal/webhook/v1alpha1/organization_webhook_test.go index 2745a59..b49b68f 100644 --- a/internal/webhook/v1alpha1/organization_webhook_test.go +++ b/internal/webhook/v1alpha1/organization_webhook_test.go @@ -1,18 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ //nolint:goconst // Ignoring constant strings in tests for better readability package v1alpha1 diff --git a/internal/webhook/v1alpha1/repository_webhook.go b/internal/webhook/v1alpha1/repository_webhook.go index 17fa451..2816b01 100644 --- a/internal/webhook/v1alpha1/repository_webhook.go +++ b/internal/webhook/v1alpha1/repository_webhook.go @@ -1,19 +1,3 @@ -/* -Copyright 2026. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( diff --git a/internal/webhook/v1alpha1/repository_webhook_test.go b/internal/webhook/v1alpha1/repository_webhook_test.go index 958054c..99a78cd 100644 --- a/internal/webhook/v1alpha1/repository_webhook_test.go +++ b/internal/webhook/v1alpha1/repository_webhook_test.go @@ -1,19 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( diff --git a/internal/webhook/v1alpha1/webhook_suite_test.go b/internal/webhook/v1alpha1/webhook_suite_test.go index 6db5f5f..3b3ec65 100644 --- a/internal/webhook/v1alpha1/webhook_suite_test.go +++ b/internal/webhook/v1alpha1/webhook_suite_test.go @@ -1,19 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package v1alpha1 import ( diff --git a/test/e2e/e2e_suite_test.go b/test/e2e/e2e_suite_test.go index 2d7945a..d7d467a 100644 --- a/test/e2e/e2e_suite_test.go +++ b/test/e2e/e2e_suite_test.go @@ -1,22 +1,6 @@ //go:build e2e // +build e2e -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package e2e import ( @@ -41,6 +25,8 @@ var ( // TestE2E runs the e2e test suite to validate the solution in an isolated environment. // The default setup requires Kind and CertManager. // +// To enable kubectl kuberc (use custom kubectl configurations), set: KUBECTL_KUBERC=true +// By default, kuberc is disabled to ensure consistent test behavior across different environments. // To skip CertManager installation, set: CERT_MANAGER_INSTALL_SKIP=true func TestE2E(t *testing.T) { RegisterFailHandler(Fail) @@ -60,6 +46,7 @@ var _ = BeforeSuite(func() { err = utils.LoadImageToKindClusterWithName(managerImage) ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to load the manager image into Kind") + configureKubectlKubeRC() setupCertManager() }) @@ -67,6 +54,21 @@ var _ = AfterSuite(func() { teardownCertManager() }) +// Disable kubectl kuberc by default for test isolation. +// This prevents local kubectl configurations from affecting test behavior. +// To enable kuberc, set: KUBECTL_KUBERC=true +func configureKubectlKubeRC() { + if os.Getenv("KUBECTL_KUBERC") != "true" { + By("disabling kubectl kuberc for test isolation") + err := os.Setenv("KUBECTL_KUBERC", "false") + ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to disable kubectl kuberc") + _, _ = fmt.Fprintf(GinkgoWriter, + "kubectl kuberc disabled for consistent test behavior (override with KUBECTL_KUBERC=true)\n") + } else { + _, _ = fmt.Fprintf(GinkgoWriter, "kubectl kuberc enabled (KUBECTL_KUBERC=true)\n") + } +} + // setupCertManager installs CertManager if needed for webhook tests. // Skips installation if CERT_MANAGER_INSTALL_SKIP=true or if already present. func setupCertManager() { diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index efd0171..d8e1349 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -1,22 +1,6 @@ //go:build e2e // +build e2e -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package e2e import ( @@ -144,7 +128,7 @@ var _ = Describe("Manager", Ordered, func() { It("should run successfully", func() { By("validating that the controller-manager pod is running as expected") verifyControllerUp := func(g Gomega) { - // Get the name of the controller-manager pod + By("getting the name of the controller-manager pod") cmd := exec.Command("kubectl", "get", "pods", "-l", "control-plane=controller-manager", "-o", "go-template={{ range .items }}"+ @@ -161,7 +145,7 @@ var _ = Describe("Manager", Ordered, func() { controllerPodName = podNames[0] g.Expect(controllerPodName).To(ContainSubstring("controller-manager")) - // Validate the pod's status + By("validating the pod's status") cmd = exec.Command("kubectl", "get", "pods", controllerPodName, "-o", "jsonpath={.status.phase}", "-n", namespace, @@ -354,7 +338,7 @@ func serviceAccountToken() (string, error) { "kind": "TokenRequest" }` - // Temporary file to store the token request + By("creating temporary file to store the token request") secretName := fmt.Sprintf("%s-token-request", serviceAccountName) tokenRequestFile := filepath.Join("/tmp", secretName) err := os.WriteFile(tokenRequestFile, []byte(tokenRequestRawString), os.FileMode(0o644)) @@ -364,7 +348,7 @@ func serviceAccountToken() (string, error) { var out string verifyTokenCreation := func(g Gomega) { - // Execute kubectl command to create the token + By("executing kubectl command to create the token") cmd := exec.Command("kubectl", "create", "--raw", fmt.Sprintf( "/api/v1/namespaces/%s/serviceaccounts/%s/token", namespace, @@ -374,7 +358,7 @@ func serviceAccountToken() (string, error) { output, err := cmd.CombinedOutput() g.Expect(err).NotTo(HaveOccurred()) - // Parse the JSON output to extract the token + By("parsing the JSON output to extract the token") var token tokenRequest err = json.Unmarshal(output, &token) g.Expect(err).NotTo(HaveOccurred()) diff --git a/test/utils/utils.go b/test/utils/utils.go index 816e031..6ea42bf 100644 --- a/test/utils/utils.go +++ b/test/utils/utils.go @@ -1,19 +1,3 @@ -/* -Copyright 2025. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - package utils import ( @@ -28,7 +12,7 @@ import ( ) const ( - certmanagerVersion = "v1.20.0" + certmanagerVersion = "v1.20.2" certmanagerURLTmpl = "https://github.com/cert-manager/cert-manager/releases/download/%s/cert-manager.yaml" defaultKindBinary = "kind"