From 189e8ddd47f72a4abb53ae0ee5ce4d37393b883f Mon Sep 17 00:00:00 2001 From: Atze de Vries Date: Mon, 5 Feb 2024 13:25:35 +0100 Subject: [PATCH 1/7] chore: Bump to upjet 1.0.0 --- .../v1alpha1/zz_actionssecret_types.go | 36 +- .../actions/v1alpha1/zz_generated.deepcopy.go | 32 +- .../v1alpha1/zz_generated_terraformed.go | 49 +- apis/actions/v1alpha1/zz_groupversion_info.go | 8 +- apis/generate.go | 2 +- apis/repo/v1alpha1/zz_branch_types.go | 30 + .../v1alpha1/zz_branchprotection_types.go | 166 ++- apis/repo/v1alpha1/zz_defaultbranch_types.go | 22 + apis/repo/v1alpha1/zz_deploykey_types.go | 53 +- apis/repo/v1alpha1/zz_generated.deepcopy.go | 1298 ++++++++++++++++- .../repo/v1alpha1/zz_generated_terraformed.go | 289 +++- apis/repo/v1alpha1/zz_groupversion_info.go | 8 +- apis/repo/v1alpha1/zz_pullrequest_types.go | 68 +- apis/repo/v1alpha1/zz_repository_types.go | 351 ++++- apis/repo/v1alpha1/zz_repositoryfile_types.go | 89 +- apis/team/v1alpha1/zz_generated.deepcopy.go | 113 +- .../team/v1alpha1/zz_generated_terraformed.go | 89 +- apis/team/v1alpha1/zz_groupversion_info.go | 8 +- apis/team/v1alpha1/zz_team_types.go | 66 +- apis/team/v1alpha1/zz_teamrepository_types.go | 33 + apis/v1alpha1/zz_generated.deepcopy.go | 1 - apis/v1beta1/zz_generated.deepcopy.go | 1 - apis/zz_register.go | 4 + cmd/generator/main.go | 2 +- cmd/provider/main.go | 4 +- config/actionssecret/config.go | 2 +- config/branch/config.go | 2 +- config/branchprotection/config.go | 2 +- config/defaultbranch/config.go | 2 +- config/deploykey/config.go | 2 +- config/external_name.go | 2 +- config/provider.go | 4 +- config/pullrequest/config.go | 2 +- config/repository/config.go | 2 +- config/repositoryfile/config.go | 2 +- config/team/config.go | 2 +- config/teamrepository/config.go | 2 +- examples-generated/actions/actionssecret.yaml | 5 +- examples-generated/repo/branch.yaml | 5 +- examples-generated/repo/branchprotection.yaml | 11 +- examples-generated/repo/defaultbranch.yaml | 9 +- examples-generated/repo/deploykey.yaml | 5 +- examples-generated/repo/pullrequest.yaml | 5 +- examples-generated/repo/repository.yaml | 5 +- examples-generated/repo/repositoryfile.yaml | 7 +- examples-generated/team/team.yaml | 5 +- examples-generated/team/teamrepository.yaml | 9 +- go.mod | 143 +- go.sum | 765 ++-------- internal/clients/github.go | 2 +- .../actions/actionssecret/zz_controller.go | 35 +- internal/controller/providerconfig/config.go | 2 +- .../controller/repo/branch/zz_controller.go | 35 +- .../repo/branchprotection/zz_controller.go | 35 +- .../repo/defaultbranch/zz_controller.go | 35 +- .../repo/deploykey/zz_controller.go | 35 +- .../repo/pullrequest/zz_controller.go | 35 +- .../repo/repository/zz_controller.go | 35 +- .../repo/repositoryfile/zz_controller.go | 35 +- .../controller/team/team/zz_controller.go | 35 +- .../team/teamrepository/zz_controller.go | 35 +- internal/controller/zz_setup.go | 8 +- ...s.template.upbound.io_actionssecrets.yaml} | 114 +- .../github.upbound.io_providerconfigs.yaml | 12 +- ...ithub.upbound.io_providerconfigusages.yaml | 9 +- .../crds/github.upbound.io_storeconfigs.yaml | 173 +-- .../repo.github.upbound.io_repositories.yaml | 597 -------- ...=> repo.template.upbound.io_branches.yaml} | 112 +- ...emplate.upbound.io_branchprotections.yaml} | 321 +++- ....template.upbound.io_defaultbranches.yaml} | 100 +- ... repo.template.upbound.io_deploykeys.yaml} | 133 +- ...epo.template.upbound.io_pullrequests.yaml} | 154 +- ...repo.template.upbound.io_repositories.yaml | 1054 +++++++++++++ ....template.upbound.io_repositoryfiles.yaml} | 187 ++- ...template.upbound.io_teamrepositories.yaml} | 117 +- ...ml => team.template.upbound.io_teams.yaml} | 147 +- 76 files changed, 5230 insertions(+), 2184 deletions(-) rename package/crds/{actions.github.upbound.io_actionssecrets.yaml => actions.template.upbound.io_actionssecrets.yaml} (81%) delete mode 100644 package/crds/repo.github.upbound.io_repositories.yaml rename package/crds/{repo.github.upbound.io_branches.yaml => repo.template.upbound.io_branches.yaml} (80%) rename package/crds/{repo.github.upbound.io_branchprotections.yaml => repo.template.upbound.io_branchprotections.yaml} (57%) rename package/crds/{repo.github.upbound.io_defaultbranches.yaml => repo.template.upbound.io_defaultbranches.yaml} (82%) rename package/crds/{repo.github.upbound.io_deploykeys.yaml => repo.template.upbound.io_deploykeys.yaml} (76%) rename package/crds/{repo.github.upbound.io_pullrequests.yaml => repo.template.upbound.io_pullrequests.yaml} (78%) create mode 100644 package/crds/repo.template.upbound.io_repositories.yaml rename package/crds/{repo.github.upbound.io_repositoryfiles.yaml => repo.template.upbound.io_repositoryfiles.yaml} (72%) rename package/crds/{team.github.upbound.io_teamrepositories.yaml => team.template.upbound.io_teamrepositories.yaml} (82%) rename package/crds/{team.github.upbound.io_teams.yaml => team.template.upbound.io_teams.yaml} (69%) diff --git a/apis/actions/v1alpha1/zz_actionssecret_types.go b/apis/actions/v1alpha1/zz_actionssecret_types.go index d6462ef..5949816 100755 --- a/apis/actions/v1alpha1/zz_actionssecret_types.go +++ b/apis/actions/v1alpha1/zz_actionssecret_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type ActionsSecretInitParameters struct { + + // Name of the secret + SecretName *string `json:"secretName,omitempty" tf:"secret_name,omitempty"` +} + type ActionsSecretObservation struct { // Date of actions_secret creation. @@ -20,6 +30,12 @@ type ActionsSecretObservation struct { ID *string `json:"id,omitempty" tf:"id,omitempty"` + // Name of the repository + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + + // Name of the secret + SecretName *string `json:"secretName,omitempty" tf:"secret_name,omitempty"` + // Date of actions_secret update. UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` } @@ -48,14 +64,25 @@ type ActionsSecretParameters struct { RepositorySelector *v1.Selector `json:"repositorySelector,omitempty" tf:"-"` // Name of the secret - // +kubebuilder:validation:Required - SecretName *string `json:"secretName" tf:"secret_name,omitempty"` + // +kubebuilder:validation:Optional + SecretName *string `json:"secretName,omitempty" tf:"secret_name,omitempty"` } // ActionsSecretSpec defines the desired state of ActionsSecret type ActionsSecretSpec struct { v1.ResourceSpec `json:",inline"` ForProvider ActionsSecretParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider ActionsSecretInitParameters `json:"initProvider,omitempty"` } // ActionsSecretStatus defines the observed state of ActionsSecret. @@ -76,8 +103,9 @@ type ActionsSecretStatus struct { type ActionsSecret struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec ActionsSecretSpec `json:"spec"` - Status ActionsSecretStatus `json:"status,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.secretName) || (has(self.initProvider) && has(self.initProvider.secretName))",message="spec.forProvider.secretName is a required parameter" + Spec ActionsSecretSpec `json:"spec"` + Status ActionsSecretStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/actions/v1alpha1/zz_generated.deepcopy.go b/apis/actions/v1alpha1/zz_generated.deepcopy.go index 2c904d4..55f81cd 100644 --- a/apis/actions/v1alpha1/zz_generated.deepcopy.go +++ b/apis/actions/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -41,6 +40,26 @@ func (in *ActionsSecret) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ActionsSecretInitParameters) DeepCopyInto(out *ActionsSecretInitParameters) { + *out = *in + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionsSecretInitParameters. +func (in *ActionsSecretInitParameters) DeepCopy() *ActionsSecretInitParameters { + if in == nil { + return nil + } + out := new(ActionsSecretInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ActionsSecretList) DeepCopyInto(out *ActionsSecretList) { *out = *in @@ -86,6 +105,16 @@ func (in *ActionsSecretObservation) DeepCopyInto(out *ActionsSecretObservation) *out = new(string) **out = **in } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } if in.UpdatedAt != nil { in, out := &in.UpdatedAt, &out.UpdatedAt *out = new(string) @@ -153,6 +182,7 @@ func (in *ActionsSecretSpec) DeepCopyInto(out *ActionsSecretSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActionsSecretSpec. diff --git a/apis/actions/v1alpha1/zz_generated_terraformed.go b/apis/actions/v1alpha1/zz_generated_terraformed.go index 310a8a4..ad92aff 100755 --- a/apis/actions/v1alpha1/zz_generated_terraformed.go +++ b/apis/actions/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this ActionsSecret @@ -69,6 +74,46 @@ func (tr *ActionsSecret) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this ActionsSecret +func (tr *ActionsSecret) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this ActionsSecret +func (tr *ActionsSecret) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ActionsSecret using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ActionsSecret) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/actions/v1alpha1/zz_groupversion_info.go b/apis/actions/v1alpha1/zz_groupversion_info.go index 8ca0d5b..2851c46 100755 --- a/apis/actions/v1alpha1/zz_groupversion_info.go +++ b/apis/actions/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -5,7 +9,7 @@ Copyright 2022 Upbound Inc. // Code generated by upjet. DO NOT EDIT. // +kubebuilder:object:generate=true -// +groupName=actions.github.upbound.io +// +groupName=actions.template.upbound.io // +versionName=v1alpha1 package v1alpha1 @@ -16,7 +20,7 @@ import ( // Package type metadata. const ( - CRDGroup = "actions.github.upbound.io" + CRDGroup = "actions.template.upbound.io" CRDVersion = "v1alpha1" ) diff --git a/apis/generate.go b/apis/generate.go index 7dcd77d..233d170 100644 --- a/apis/generate.go +++ b/apis/generate.go @@ -19,7 +19,7 @@ Copyright 2021 Upbound Inc. //go:generate rm -rf ../examples-generated // Generate documentation from Terraform docs. -//go:generate go run github.com/upbound/upjet/cmd/scraper -n ${TERRAFORM_PROVIDER_SOURCE} -r ../.work/${TERRAFORM_PROVIDER_SOURCE}/${TERRAFORM_DOCS_PATH} -o ../config/provider-metadata.yaml +//go:generate go run github.com/crossplane/upjet/cmd/scraper -n ${TERRAFORM_PROVIDER_SOURCE} -r ../.work/${TERRAFORM_PROVIDER_SOURCE}/${TERRAFORM_DOCS_PATH} -o ../config/provider-metadata.yaml // Run Upjet generator //go:generate go run ../cmd/generator/main.go .. diff --git a/apis/repo/v1alpha1/zz_branch_types.go b/apis/repo/v1alpha1/zz_branch_types.go index 0ab6c3f..21e3535 100755 --- a/apis/repo/v1alpha1/zz_branch_types.go +++ b/apis/repo/v1alpha1/zz_branch_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,6 +17,12 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type BranchInitParameters struct { + + // The commit hash to start from. Defaults to the tip of source_branch. If provided, source_branch is ignored. + SourceSha *string `json:"sourceSha,omitempty" tf:"source_sha,omitempty"` +} + type BranchObservation struct { // An etag representing the Branch object. @@ -23,8 +33,17 @@ type BranchObservation struct { // A string representing a branch reference, in the form of refs/heads/. Ref *string `json:"ref,omitempty" tf:"ref,omitempty"` + // The GitHub repository name. + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + // A string storing the reference's HEAD commit's SHA1. Sha *string `json:"sha,omitempty" tf:"sha,omitempty"` + + // The branch name to start from. Defaults to main. + SourceBranch *string `json:"sourceBranch,omitempty" tf:"source_branch,omitempty"` + + // The commit hash to start from. Defaults to the tip of source_branch. If provided, source_branch is ignored. + SourceSha *string `json:"sourceSha,omitempty" tf:"source_sha,omitempty"` } type BranchParameters struct { @@ -55,6 +74,17 @@ type BranchParameters struct { type BranchSpec struct { v1.ResourceSpec `json:",inline"` ForProvider BranchParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider BranchInitParameters `json:"initProvider,omitempty"` } // BranchStatus defines the observed state of Branch. diff --git a/apis/repo/v1alpha1/zz_branchprotection_types.go b/apis/repo/v1alpha1/zz_branchprotection_types.go index 2faea73..a9fd23c 100755 --- a/apis/repo/v1alpha1/zz_branchprotection_types.go +++ b/apis/repo/v1alpha1/zz_branchprotection_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,8 +17,88 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type BranchProtectionInitParameters struct { + + // Boolean, setting this to true to allow the branch to be deleted. + AllowsDeletions *bool `json:"allowsDeletions,omitempty" tf:"allows_deletions,omitempty"` + + // Boolean, setting this to true to allow force pushes on the branch. + AllowsForcePushes *bool `json:"allowsForcePushes,omitempty" tf:"allows_force_pushes,omitempty"` + + // Boolean, setting this to true to block creating the branch. + BlocksCreations *bool `json:"blocksCreations,omitempty" tf:"blocks_creations,omitempty"` + + // Boolean, setting this to true enforces status checks for repository administrators. + EnforceAdmins *bool `json:"enforceAdmins,omitempty" tf:"enforce_admins,omitempty"` + + // Boolean, Setting this to true will make the branch read-only and preventing any pushes to it. Defaults to false + LockBranch *bool `json:"lockBranch,omitempty" tf:"lock_branch,omitempty"` + + // Identifies the protection rule pattern. + Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"` + + // The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"` + + // Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged. + RequireConversationResolution *bool `json:"requireConversationResolution,omitempty" tf:"require_conversation_resolution,omitempty"` + + // Boolean, setting this to true requires all commits to be signed with GPG. + RequireSignedCommits *bool `json:"requireSignedCommits,omitempty" tf:"require_signed_commits,omitempty"` + + // Boolean, setting this to true enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch + RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"` + + // Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details. + RequiredPullRequestReviews []RequiredPullRequestReviewsInitParameters `json:"requiredPullRequestReviews,omitempty" tf:"required_pull_request_reviews,omitempty"` + + // Enforce restrictions for required status checks. See Required Status Checks below for details. + RequiredStatusChecks []RequiredStatusChecksInitParameters `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"` +} + type BranchProtectionObservation struct { + + // Boolean, setting this to true to allow the branch to be deleted. + AllowsDeletions *bool `json:"allowsDeletions,omitempty" tf:"allows_deletions,omitempty"` + + // Boolean, setting this to true to allow force pushes on the branch. + AllowsForcePushes *bool `json:"allowsForcePushes,omitempty" tf:"allows_force_pushes,omitempty"` + + // Boolean, setting this to true to block creating the branch. + BlocksCreations *bool `json:"blocksCreations,omitempty" tf:"blocks_creations,omitempty"` + + // Boolean, setting this to true enforces status checks for repository administrators. + EnforceAdmins *bool `json:"enforceAdmins,omitempty" tf:"enforce_admins,omitempty"` + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Boolean, Setting this to true will make the branch read-only and preventing any pushes to it. Defaults to false + LockBranch *bool `json:"lockBranch,omitempty" tf:"lock_branch,omitempty"` + + // Identifies the protection rule pattern. + Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"` + + // The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"` + + // The name or node ID of the repository associated with this branch protection rule. + // Node ID or name of repository + RepositoryID *string `json:"repositoryId,omitempty" tf:"repository_id,omitempty"` + + // Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged. + RequireConversationResolution *bool `json:"requireConversationResolution,omitempty" tf:"require_conversation_resolution,omitempty"` + + // Boolean, setting this to true requires all commits to be signed with GPG. + RequireSignedCommits *bool `json:"requireSignedCommits,omitempty" tf:"require_signed_commits,omitempty"` + + // Boolean, setting this to true enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch + RequiredLinearHistory *bool `json:"requiredLinearHistory,omitempty" tf:"required_linear_history,omitempty"` + + // Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details. + RequiredPullRequestReviews []RequiredPullRequestReviewsObservation `json:"requiredPullRequestReviews,omitempty" tf:"required_pull_request_reviews,omitempty"` + + // Enforce restrictions for required status checks. See Required Status Checks below for details. + RequiredStatusChecks []RequiredStatusChecksObservation `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"` } type BranchProtectionParameters struct { @@ -40,8 +124,8 @@ type BranchProtectionParameters struct { LockBranch *bool `json:"lockBranch,omitempty" tf:"lock_branch,omitempty"` // Identifies the protection rule pattern. - // +kubebuilder:validation:Required - Pattern *string `json:"pattern" tf:"pattern,omitempty"` + // +kubebuilder:validation:Optional + Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"` // The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. // +kubebuilder:validation:Optional @@ -82,7 +166,54 @@ type BranchProtectionParameters struct { RequiredStatusChecks []RequiredStatusChecksParameters `json:"requiredStatusChecks,omitempty" tf:"required_status_checks,omitempty"` } +type RequiredPullRequestReviewsInitParameters struct { + + // : Dismiss approved reviews automatically when a new commit is pushed. Defaults to false. + DismissStaleReviews *bool `json:"dismissStaleReviews,omitempty" tf:"dismiss_stale_reviews,omitempty"` + + // : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"` + + // : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"` + + // : Require an approved review in pull requests including files with a designated code owner. Defaults to false. + RequireCodeOwnerReviews *bool `json:"requireCodeOwnerReviews,omitempty" tf:"require_code_owner_reviews,omitempty"` + + // : Require that The most recent push must be approved by someone other than the last pusher. Defaults to false + RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"` + + // 6. This requirement matches GitHub's API, see the upstream documentation for more information. + // (https://developer.github.com/v3/repos/branches/#parameters-1) for more information. + RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"` + + // : Restrict pull request review dismissals. + RestrictDismissals *bool `json:"restrictDismissals,omitempty" tf:"restrict_dismissals,omitempty"` +} + type RequiredPullRequestReviewsObservation struct { + + // : Dismiss approved reviews automatically when a new commit is pushed. Defaults to false. + DismissStaleReviews *bool `json:"dismissStaleReviews,omitempty" tf:"dismiss_stale_reviews,omitempty"` + + // : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"` + + // : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"` + + // : Require an approved review in pull requests including files with a designated code owner. Defaults to false. + RequireCodeOwnerReviews *bool `json:"requireCodeOwnerReviews,omitempty" tf:"require_code_owner_reviews,omitempty"` + + // : Require that The most recent push must be approved by someone other than the last pusher. Defaults to false + RequireLastPushApproval *bool `json:"requireLastPushApproval,omitempty" tf:"require_last_push_approval,omitempty"` + + // 6. This requirement matches GitHub's API, see the upstream documentation for more information. + // (https://developer.github.com/v3/repos/branches/#parameters-1) for more information. + RequiredApprovingReviewCount *float64 `json:"requiredApprovingReviewCount,omitempty" tf:"required_approving_review_count,omitempty"` + + // : Restrict pull request review dismissals. + RestrictDismissals *bool `json:"restrictDismissals,omitempty" tf:"restrict_dismissals,omitempty"` } type RequiredPullRequestReviewsParameters struct { @@ -117,7 +248,22 @@ type RequiredPullRequestReviewsParameters struct { RestrictDismissals *bool `json:"restrictDismissals,omitempty" tf:"restrict_dismissals,omitempty"` } +type RequiredStatusChecksInitParameters struct { + + // : The list of status checks to require in order to merge into this branch. No status checks are required by default. + Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"` + + // : Require branches to be up to date before merging. Defaults to false. + Strict *bool `json:"strict,omitempty" tf:"strict,omitempty"` +} + type RequiredStatusChecksObservation struct { + + // : The list of status checks to require in order to merge into this branch. No status checks are required by default. + Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"` + + // : Require branches to be up to date before merging. Defaults to false. + Strict *bool `json:"strict,omitempty" tf:"strict,omitempty"` } type RequiredStatusChecksParameters struct { @@ -135,6 +281,17 @@ type RequiredStatusChecksParameters struct { type BranchProtectionSpec struct { v1.ResourceSpec `json:",inline"` ForProvider BranchProtectionParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider BranchProtectionInitParameters `json:"initProvider,omitempty"` } // BranchProtectionStatus defines the observed state of BranchProtection. @@ -155,8 +312,9 @@ type BranchProtectionStatus struct { type BranchProtection struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec BranchProtectionSpec `json:"spec"` - Status BranchProtectionStatus `json:"status,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.pattern) || (has(self.initProvider) && has(self.initProvider.pattern))",message="spec.forProvider.pattern is a required parameter" + Spec BranchProtectionSpec `json:"spec"` + Status BranchProtectionStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/repo/v1alpha1/zz_defaultbranch_types.go b/apis/repo/v1alpha1/zz_defaultbranch_types.go index d89454b..b79bd1b 100755 --- a/apis/repo/v1alpha1/zz_defaultbranch_types.go +++ b/apis/repo/v1alpha1/zz_defaultbranch_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,7 +17,14 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type DefaultBranchInitParameters struct { +} + type DefaultBranchObservation struct { + + // The branch (e.g. main) + Branch *string `json:"branch,omitempty" tf:"branch,omitempty"` + ID *string `json:"id,omitempty" tf:"id,omitempty"` } @@ -37,6 +48,17 @@ type DefaultBranchParameters struct { type DefaultBranchSpec struct { v1.ResourceSpec `json:",inline"` ForProvider DefaultBranchParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider DefaultBranchInitParameters `json:"initProvider,omitempty"` } // DefaultBranchStatus defines the observed state of DefaultBranch. diff --git a/apis/repo/v1alpha1/zz_deploykey_types.go b/apis/repo/v1alpha1/zz_deploykey_types.go index 99b6a89..342101a 100755 --- a/apis/repo/v1alpha1/zz_deploykey_types.go +++ b/apis/repo/v1alpha1/zz_deploykey_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,17 +17,41 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type DeployKeyInitParameters struct { + + // A SSH key. + Key *string `json:"key,omitempty" tf:"key,omitempty"` + + // A boolean qualifying the key to be either read only or read/write. + ReadOnly *bool `json:"readOnly,omitempty" tf:"read_only,omitempty"` + + // A title. + Title *string `json:"title,omitempty" tf:"title,omitempty"` +} + type DeployKeyObservation struct { Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // A SSH key. + Key *string `json:"key,omitempty" tf:"key,omitempty"` + + // A boolean qualifying the key to be either read only or read/write. + ReadOnly *bool `json:"readOnly,omitempty" tf:"read_only,omitempty"` + + // Name of the GitHub repository. + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + + // A title. + Title *string `json:"title,omitempty" tf:"title,omitempty"` } type DeployKeyParameters struct { // A SSH key. - // +kubebuilder:validation:Required - Key *string `json:"key" tf:"key,omitempty"` + // +kubebuilder:validation:Optional + Key *string `json:"key,omitempty" tf:"key,omitempty"` // A boolean qualifying the key to be either read only or read/write. // +kubebuilder:validation:Optional @@ -43,14 +71,25 @@ type DeployKeyParameters struct { RepositorySelector *v1.Selector `json:"repositorySelector,omitempty" tf:"-"` // A title. - // +kubebuilder:validation:Required - Title *string `json:"title" tf:"title,omitempty"` + // +kubebuilder:validation:Optional + Title *string `json:"title,omitempty" tf:"title,omitempty"` } // DeployKeySpec defines the desired state of DeployKey type DeployKeySpec struct { v1.ResourceSpec `json:",inline"` ForProvider DeployKeyParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider DeployKeyInitParameters `json:"initProvider,omitempty"` } // DeployKeyStatus defines the observed state of DeployKey. @@ -71,8 +110,10 @@ type DeployKeyStatus struct { type DeployKey struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec DeployKeySpec `json:"spec"` - Status DeployKeyStatus `json:"status,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.key) || (has(self.initProvider) && has(self.initProvider.key))",message="spec.forProvider.key is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.title) || (has(self.initProvider) && has(self.initProvider.title))",message="spec.forProvider.title is a required parameter" + Spec DeployKeySpec `json:"spec"` + Status DeployKeyStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/repo/v1alpha1/zz_generated.deepcopy.go b/apis/repo/v1alpha1/zz_generated.deepcopy.go index 6f4435e..0a8b8f4 100644 --- a/apis/repo/v1alpha1/zz_generated.deepcopy.go +++ b/apis/repo/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -14,9 +13,34 @@ import ( runtime "k8s.io/apimachinery/pkg/runtime" ) +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *AdvancedSecurityInitParameters) DeepCopyInto(out *AdvancedSecurityInitParameters) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdvancedSecurityInitParameters. +func (in *AdvancedSecurityInitParameters) DeepCopy() *AdvancedSecurityInitParameters { + if in == nil { + return nil + } + out := new(AdvancedSecurityInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AdvancedSecurityObservation) DeepCopyInto(out *AdvancedSecurityObservation) { *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdvancedSecurityObservation. @@ -76,6 +100,26 @@ func (in *Branch) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BranchInitParameters) DeepCopyInto(out *BranchInitParameters) { + *out = *in + if in.SourceSha != nil { + in, out := &in.SourceSha, &out.SourceSha + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchInitParameters. +func (in *BranchInitParameters) DeepCopy() *BranchInitParameters { + if in == nil { + return nil + } + out := new(BranchInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BranchList) DeepCopyInto(out *BranchList) { *out = *in @@ -126,11 +170,26 @@ func (in *BranchObservation) DeepCopyInto(out *BranchObservation) { *out = new(string) **out = **in } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } if in.Sha != nil { in, out := &in.Sha, &out.Sha *out = new(string) **out = **in } + if in.SourceBranch != nil { + in, out := &in.SourceBranch, &out.SourceBranch + *out = new(string) + **out = **in + } + if in.SourceSha != nil { + in, out := &in.SourceSha, &out.SourceSha + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchObservation. @@ -210,6 +269,91 @@ func (in *BranchProtection) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BranchProtectionInitParameters) DeepCopyInto(out *BranchProtectionInitParameters) { + *out = *in + if in.AllowsDeletions != nil { + in, out := &in.AllowsDeletions, &out.AllowsDeletions + *out = new(bool) + **out = **in + } + if in.AllowsForcePushes != nil { + in, out := &in.AllowsForcePushes, &out.AllowsForcePushes + *out = new(bool) + **out = **in + } + if in.BlocksCreations != nil { + in, out := &in.BlocksCreations, &out.BlocksCreations + *out = new(bool) + **out = **in + } + if in.EnforceAdmins != nil { + in, out := &in.EnforceAdmins, &out.EnforceAdmins + *out = new(bool) + **out = **in + } + if in.LockBranch != nil { + in, out := &in.LockBranch, &out.LockBranch + *out = new(bool) + **out = **in + } + if in.Pattern != nil { + in, out := &in.Pattern, &out.Pattern + *out = new(string) + **out = **in + } + if in.PushRestrictions != nil { + in, out := &in.PushRestrictions, &out.PushRestrictions + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.RequireConversationResolution != nil { + in, out := &in.RequireConversationResolution, &out.RequireConversationResolution + *out = new(bool) + **out = **in + } + if in.RequireSignedCommits != nil { + in, out := &in.RequireSignedCommits, &out.RequireSignedCommits + *out = new(bool) + **out = **in + } + if in.RequiredLinearHistory != nil { + in, out := &in.RequiredLinearHistory, &out.RequiredLinearHistory + *out = new(bool) + **out = **in + } + if in.RequiredPullRequestReviews != nil { + in, out := &in.RequiredPullRequestReviews, &out.RequiredPullRequestReviews + *out = make([]RequiredPullRequestReviewsInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RequiredStatusChecks != nil { + in, out := &in.RequiredStatusChecks, &out.RequiredStatusChecks + *out = make([]RequiredStatusChecksInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchProtectionInitParameters. +func (in *BranchProtectionInitParameters) DeepCopy() *BranchProtectionInitParameters { + if in == nil { + return nil + } + out := new(BranchProtectionInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BranchProtectionList) DeepCopyInto(out *BranchProtectionList) { *out = *in @@ -245,11 +389,86 @@ func (in *BranchProtectionList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *BranchProtectionObservation) DeepCopyInto(out *BranchProtectionObservation) { *out = *in + if in.AllowsDeletions != nil { + in, out := &in.AllowsDeletions, &out.AllowsDeletions + *out = new(bool) + **out = **in + } + if in.AllowsForcePushes != nil { + in, out := &in.AllowsForcePushes, &out.AllowsForcePushes + *out = new(bool) + **out = **in + } + if in.BlocksCreations != nil { + in, out := &in.BlocksCreations, &out.BlocksCreations + *out = new(bool) + **out = **in + } + if in.EnforceAdmins != nil { + in, out := &in.EnforceAdmins, &out.EnforceAdmins + *out = new(bool) + **out = **in + } if in.ID != nil { in, out := &in.ID, &out.ID *out = new(string) **out = **in } + if in.LockBranch != nil { + in, out := &in.LockBranch, &out.LockBranch + *out = new(bool) + **out = **in + } + if in.Pattern != nil { + in, out := &in.Pattern, &out.Pattern + *out = new(string) + **out = **in + } + if in.PushRestrictions != nil { + in, out := &in.PushRestrictions, &out.PushRestrictions + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.RepositoryID != nil { + in, out := &in.RepositoryID, &out.RepositoryID + *out = new(string) + **out = **in + } + if in.RequireConversationResolution != nil { + in, out := &in.RequireConversationResolution, &out.RequireConversationResolution + *out = new(bool) + **out = **in + } + if in.RequireSignedCommits != nil { + in, out := &in.RequireSignedCommits, &out.RequireSignedCommits + *out = new(bool) + **out = **in + } + if in.RequiredLinearHistory != nil { + in, out := &in.RequiredLinearHistory, &out.RequiredLinearHistory + *out = new(bool) + **out = **in + } + if in.RequiredPullRequestReviews != nil { + in, out := &in.RequiredPullRequestReviews, &out.RequiredPullRequestReviews + *out = make([]RequiredPullRequestReviewsObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RequiredStatusChecks != nil { + in, out := &in.RequiredStatusChecks, &out.RequiredStatusChecks + *out = make([]RequiredStatusChecksObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchProtectionObservation. @@ -367,6 +586,7 @@ func (in *BranchProtectionSpec) DeepCopyInto(out *BranchProtectionSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchProtectionSpec. @@ -401,6 +621,7 @@ func (in *BranchSpec) DeepCopyInto(out *BranchSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BranchSpec. @@ -457,6 +678,21 @@ func (in *DefaultBranch) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DefaultBranchInitParameters) DeepCopyInto(out *DefaultBranchInitParameters) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultBranchInitParameters. +func (in *DefaultBranchInitParameters) DeepCopy() *DefaultBranchInitParameters { + if in == nil { + return nil + } + out := new(DefaultBranchInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DefaultBranchList) DeepCopyInto(out *DefaultBranchList) { *out = *in @@ -492,6 +728,11 @@ func (in *DefaultBranchList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DefaultBranchObservation) DeepCopyInto(out *DefaultBranchObservation) { *out = *in + if in.Branch != nil { + in, out := &in.Branch, &out.Branch + *out = new(string) + **out = **in + } if in.ID != nil { in, out := &in.ID, &out.ID *out = new(string) @@ -544,6 +785,7 @@ func (in *DefaultBranchSpec) DeepCopyInto(out *DefaultBranchSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + out.InitProvider = in.InitProvider } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultBranchSpec. @@ -600,6 +842,36 @@ func (in *DeployKey) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeployKeyInitParameters) DeepCopyInto(out *DeployKeyInitParameters) { + *out = *in + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.ReadOnly != nil { + in, out := &in.ReadOnly, &out.ReadOnly + *out = new(bool) + **out = **in + } + if in.Title != nil { + in, out := &in.Title, &out.Title + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKeyInitParameters. +func (in *DeployKeyInitParameters) DeepCopy() *DeployKeyInitParameters { + if in == nil { + return nil + } + out := new(DeployKeyInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DeployKeyList) DeepCopyInto(out *DeployKeyList) { *out = *in @@ -645,12 +917,32 @@ func (in *DeployKeyObservation) DeepCopyInto(out *DeployKeyObservation) { *out = new(string) **out = **in } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKeyObservation. -func (in *DeployKeyObservation) DeepCopy() *DeployKeyObservation { - if in == nil { - return nil + if in.Key != nil { + in, out := &in.Key, &out.Key + *out = new(string) + **out = **in + } + if in.ReadOnly != nil { + in, out := &in.ReadOnly, &out.ReadOnly + *out = new(bool) + **out = **in + } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.Title != nil { + in, out := &in.Title, &out.Title + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKeyObservation. +func (in *DeployKeyObservation) DeepCopy() *DeployKeyObservation { + if in == nil { + return nil } out := new(DeployKeyObservation) in.DeepCopyInto(out) @@ -707,6 +999,7 @@ func (in *DeployKeySpec) DeepCopyInto(out *DeployKeySpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployKeySpec. @@ -736,9 +1029,41 @@ func (in *DeployKeyStatus) DeepCopy() *DeployKeyStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PagesInitParameters) DeepCopyInto(out *PagesInitParameters) { + *out = *in + if in.Cname != nil { + in, out := &in.Cname, &out.Cname + *out = new(string) + **out = **in + } + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = make([]SourceInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagesInitParameters. +func (in *PagesInitParameters) DeepCopy() *PagesInitParameters { + if in == nil { + return nil + } + out := new(PagesInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PagesObservation) DeepCopyInto(out *PagesObservation) { *out = *in + if in.Cname != nil { + in, out := &in.Cname, &out.Cname + *out = new(string) + **out = **in + } if in.Custom404 != nil { in, out := &in.Custom404, &out.Custom404 *out = new(bool) @@ -749,6 +1074,13 @@ func (in *PagesObservation) DeepCopyInto(out *PagesObservation) { *out = new(string) **out = **in } + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = make([]SourceObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Status != nil { in, out := &in.Status, &out.Status *out = new(string) @@ -825,6 +1157,46 @@ func (in *PullRequest) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PullRequestInitParameters) DeepCopyInto(out *PullRequestInitParameters) { + *out = *in + if in.BaseRef != nil { + in, out := &in.BaseRef, &out.BaseRef + *out = new(string) + **out = **in + } + if in.Body != nil { + in, out := &in.Body, &out.Body + *out = new(string) + **out = **in + } + if in.MaintainerCanModify != nil { + in, out := &in.MaintainerCanModify, &out.MaintainerCanModify + *out = new(bool) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.Title != nil { + in, out := &in.Title, &out.Title + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PullRequestInitParameters. +func (in *PullRequestInitParameters) DeepCopy() *PullRequestInitParameters { + if in == nil { + return nil + } + out := new(PullRequestInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PullRequestList) DeepCopyInto(out *PullRequestList) { *out = *in @@ -860,16 +1232,36 @@ func (in *PullRequestList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *PullRequestObservation) DeepCopyInto(out *PullRequestObservation) { *out = *in + if in.BaseRef != nil { + in, out := &in.BaseRef, &out.BaseRef + *out = new(string) + **out = **in + } + if in.BaseRepository != nil { + in, out := &in.BaseRepository, &out.BaseRepository + *out = new(string) + **out = **in + } if in.BaseSha != nil { in, out := &in.BaseSha, &out.BaseSha *out = new(string) **out = **in } + if in.Body != nil { + in, out := &in.Body, &out.Body + *out = new(string) + **out = **in + } if in.Draft != nil { in, out := &in.Draft, &out.Draft *out = new(bool) **out = **in } + if in.HeadRef != nil { + in, out := &in.HeadRef, &out.HeadRef + *out = new(string) + **out = **in + } if in.HeadSha != nil { in, out := &in.HeadSha, &out.HeadSha *out = new(string) @@ -891,6 +1283,11 @@ func (in *PullRequestObservation) DeepCopyInto(out *PullRequestObservation) { } } } + if in.MaintainerCanModify != nil { + in, out := &in.MaintainerCanModify, &out.MaintainerCanModify + *out = new(bool) + **out = **in + } if in.Number != nil { in, out := &in.Number, &out.Number *out = new(float64) @@ -906,11 +1303,21 @@ func (in *PullRequestObservation) DeepCopyInto(out *PullRequestObservation) { *out = new(string) **out = **in } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } if in.State != nil { in, out := &in.State, &out.State *out = new(string) **out = **in } + if in.Title != nil { + in, out := &in.Title, &out.Title + *out = new(string) + **out = **in + } if in.UpdatedAt != nil { in, out := &in.UpdatedAt, &out.UpdatedAt *out = new(float64) @@ -1003,6 +1410,7 @@ func (in *PullRequestSpec) DeepCopyInto(out *PullRequestSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PullRequestSpec. @@ -1086,6 +1494,51 @@ func (in *RepositoryFile) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RepositoryFileInitParameters) DeepCopyInto(out *RepositoryFileInitParameters) { + *out = *in + if in.CommitAuthor != nil { + in, out := &in.CommitAuthor, &out.CommitAuthor + *out = new(string) + **out = **in + } + if in.CommitEmail != nil { + in, out := &in.CommitEmail, &out.CommitEmail + *out = new(string) + **out = **in + } + if in.CommitMessage != nil { + in, out := &in.CommitMessage, &out.CommitMessage + *out = new(string) + **out = **in + } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } + if in.OverwriteOnCreate != nil { + in, out := &in.OverwriteOnCreate, &out.OverwriteOnCreate + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryFileInitParameters. +func (in *RepositoryFileInitParameters) DeepCopy() *RepositoryFileInitParameters { + if in == nil { + return nil + } + out := new(RepositoryFileInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RepositoryFileList) DeepCopyInto(out *RepositoryFileList) { *out = *in @@ -1121,16 +1574,56 @@ func (in *RepositoryFileList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RepositoryFileObservation) DeepCopyInto(out *RepositoryFileObservation) { *out = *in + if in.Branch != nil { + in, out := &in.Branch, &out.Branch + *out = new(string) + **out = **in + } + if in.CommitAuthor != nil { + in, out := &in.CommitAuthor, &out.CommitAuthor + *out = new(string) + **out = **in + } + if in.CommitEmail != nil { + in, out := &in.CommitEmail, &out.CommitEmail + *out = new(string) + **out = **in + } + if in.CommitMessage != nil { + in, out := &in.CommitMessage, &out.CommitMessage + *out = new(string) + **out = **in + } if in.CommitSha != nil { in, out := &in.CommitSha, &out.CommitSha *out = new(string) **out = **in } + if in.Content != nil { + in, out := &in.Content, &out.Content + *out = new(string) + **out = **in + } + if in.File != nil { + in, out := &in.File, &out.File + *out = new(string) + **out = **in + } if in.ID != nil { in, out := &in.ID, &out.ID *out = new(string) **out = **in } + if in.OverwriteOnCreate != nil { + in, out := &in.OverwriteOnCreate, &out.OverwriteOnCreate + *out = new(bool) + **out = **in + } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } if in.Sha != nil { in, out := &in.Sha, &out.Sha *out = new(string) @@ -1228,6 +1721,7 @@ func (in *RepositoryFileSpec) DeepCopyInto(out *RepositoryFileSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryFileSpec. @@ -1258,55 +1752,307 @@ func (in *RepositoryFileStatus) DeepCopy() *RepositoryFileStatus { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RepositoryList) DeepCopyInto(out *RepositoryList) { +func (in *RepositoryInitParameters) DeepCopyInto(out *RepositoryInitParameters) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Repository, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryList. -func (in *RepositoryList) DeepCopy() *RepositoryList { - if in == nil { - return nil - } - out := new(RepositoryList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RepositoryList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c + if in.AllowAutoMerge != nil { + in, out := &in.AllowAutoMerge, &out.AllowAutoMerge + *out = new(bool) + **out = **in } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RepositoryObservation) DeepCopyInto(out *RepositoryObservation) { - *out = *in - if in.Etag != nil { - in, out := &in.Etag, &out.Etag - *out = new(string) + if in.AllowMergeCommit != nil { + in, out := &in.AllowMergeCommit, &out.AllowMergeCommit + *out = new(bool) **out = **in } - if in.FullName != nil { - in, out := &in.FullName, &out.FullName - *out = new(string) + if in.AllowRebaseMerge != nil { + in, out := &in.AllowRebaseMerge, &out.AllowRebaseMerge + *out = new(bool) **out = **in } - if in.GitCloneURL != nil { + if in.AllowSquashMerge != nil { + in, out := &in.AllowSquashMerge, &out.AllowSquashMerge + *out = new(bool) + **out = **in + } + if in.AllowUpdateBranch != nil { + in, out := &in.AllowUpdateBranch, &out.AllowUpdateBranch + *out = new(bool) + **out = **in + } + if in.ArchiveOnDestroy != nil { + in, out := &in.ArchiveOnDestroy, &out.ArchiveOnDestroy + *out = new(bool) + **out = **in + } + if in.Archived != nil { + in, out := &in.Archived, &out.Archived + *out = new(bool) + **out = **in + } + if in.AutoInit != nil { + in, out := &in.AutoInit, &out.AutoInit + *out = new(bool) + **out = **in + } + if in.DefaultBranch != nil { + in, out := &in.DefaultBranch, &out.DefaultBranch + *out = new(string) + **out = **in + } + if in.DeleteBranchOnMerge != nil { + in, out := &in.DeleteBranchOnMerge, &out.DeleteBranchOnMerge + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.GitignoreTemplate != nil { + in, out := &in.GitignoreTemplate, &out.GitignoreTemplate + *out = new(string) + **out = **in + } + if in.HasDiscussions != nil { + in, out := &in.HasDiscussions, &out.HasDiscussions + *out = new(bool) + **out = **in + } + if in.HasDownloads != nil { + in, out := &in.HasDownloads, &out.HasDownloads + *out = new(bool) + **out = **in + } + if in.HasIssues != nil { + in, out := &in.HasIssues, &out.HasIssues + *out = new(bool) + **out = **in + } + if in.HasProjects != nil { + in, out := &in.HasProjects, &out.HasProjects + *out = new(bool) + **out = **in + } + if in.HasWiki != nil { + in, out := &in.HasWiki, &out.HasWiki + *out = new(bool) + **out = **in + } + if in.HomepageURL != nil { + in, out := &in.HomepageURL, &out.HomepageURL + *out = new(string) + **out = **in + } + if in.IgnoreVulnerabilityAlertsDuringRead != nil { + in, out := &in.IgnoreVulnerabilityAlertsDuringRead, &out.IgnoreVulnerabilityAlertsDuringRead + *out = new(bool) + **out = **in + } + if in.IsTemplate != nil { + in, out := &in.IsTemplate, &out.IsTemplate + *out = new(bool) + **out = **in + } + if in.LicenseTemplate != nil { + in, out := &in.LicenseTemplate, &out.LicenseTemplate + *out = new(string) + **out = **in + } + if in.MergeCommitMessage != nil { + in, out := &in.MergeCommitMessage, &out.MergeCommitMessage + *out = new(string) + **out = **in + } + if in.MergeCommitTitle != nil { + in, out := &in.MergeCommitTitle, &out.MergeCommitTitle + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.Pages != nil { + in, out := &in.Pages, &out.Pages + *out = make([]PagesInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Private != nil { + in, out := &in.Private, &out.Private + *out = new(bool) + **out = **in + } + if in.SecurityAndAnalysis != nil { + in, out := &in.SecurityAndAnalysis, &out.SecurityAndAnalysis + *out = make([]SecurityAndAnalysisInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SquashMergeCommitMessage != nil { + in, out := &in.SquashMergeCommitMessage, &out.SquashMergeCommitMessage + *out = new(string) + **out = **in + } + if in.SquashMergeCommitTitle != nil { + in, out := &in.SquashMergeCommitTitle, &out.SquashMergeCommitTitle + *out = new(string) + **out = **in + } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = make([]TemplateInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Topics != nil { + in, out := &in.Topics, &out.Topics + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } + if in.VulnerabilityAlerts != nil { + in, out := &in.VulnerabilityAlerts, &out.VulnerabilityAlerts + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryInitParameters. +func (in *RepositoryInitParameters) DeepCopy() *RepositoryInitParameters { + if in == nil { + return nil + } + out := new(RepositoryInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RepositoryList) DeepCopyInto(out *RepositoryList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]Repository, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryList. +func (in *RepositoryList) DeepCopy() *RepositoryList { + if in == nil { + return nil + } + out := new(RepositoryList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RepositoryList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RepositoryObservation) DeepCopyInto(out *RepositoryObservation) { + *out = *in + if in.AllowAutoMerge != nil { + in, out := &in.AllowAutoMerge, &out.AllowAutoMerge + *out = new(bool) + **out = **in + } + if in.AllowMergeCommit != nil { + in, out := &in.AllowMergeCommit, &out.AllowMergeCommit + *out = new(bool) + **out = **in + } + if in.AllowRebaseMerge != nil { + in, out := &in.AllowRebaseMerge, &out.AllowRebaseMerge + *out = new(bool) + **out = **in + } + if in.AllowSquashMerge != nil { + in, out := &in.AllowSquashMerge, &out.AllowSquashMerge + *out = new(bool) + **out = **in + } + if in.AllowUpdateBranch != nil { + in, out := &in.AllowUpdateBranch, &out.AllowUpdateBranch + *out = new(bool) + **out = **in + } + if in.ArchiveOnDestroy != nil { + in, out := &in.ArchiveOnDestroy, &out.ArchiveOnDestroy + *out = new(bool) + **out = **in + } + if in.Archived != nil { + in, out := &in.Archived, &out.Archived + *out = new(bool) + **out = **in + } + if in.AutoInit != nil { + in, out := &in.AutoInit, &out.AutoInit + *out = new(bool) + **out = **in + } + if in.DefaultBranch != nil { + in, out := &in.DefaultBranch, &out.DefaultBranch + *out = new(string) + **out = **in + } + if in.DeleteBranchOnMerge != nil { + in, out := &in.DeleteBranchOnMerge, &out.DeleteBranchOnMerge + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.Etag != nil { + in, out := &in.Etag, &out.Etag + *out = new(string) + **out = **in + } + if in.FullName != nil { + in, out := &in.FullName, &out.FullName + *out = new(string) + **out = **in + } + if in.GitCloneURL != nil { in, out := &in.GitCloneURL, &out.GitCloneURL *out = new(string) **out = **in } + if in.GitignoreTemplate != nil { + in, out := &in.GitignoreTemplate, &out.GitignoreTemplate + *out = new(string) + **out = **in + } if in.HTMLURL != nil { in, out := &in.HTMLURL, &out.HTMLURL *out = new(string) @@ -1317,11 +2063,71 @@ func (in *RepositoryObservation) DeepCopyInto(out *RepositoryObservation) { *out = new(string) **out = **in } + if in.HasDiscussions != nil { + in, out := &in.HasDiscussions, &out.HasDiscussions + *out = new(bool) + **out = **in + } + if in.HasDownloads != nil { + in, out := &in.HasDownloads, &out.HasDownloads + *out = new(bool) + **out = **in + } + if in.HasIssues != nil { + in, out := &in.HasIssues, &out.HasIssues + *out = new(bool) + **out = **in + } + if in.HasProjects != nil { + in, out := &in.HasProjects, &out.HasProjects + *out = new(bool) + **out = **in + } + if in.HasWiki != nil { + in, out := &in.HasWiki, &out.HasWiki + *out = new(bool) + **out = **in + } + if in.HomepageURL != nil { + in, out := &in.HomepageURL, &out.HomepageURL + *out = new(string) + **out = **in + } if in.ID != nil { in, out := &in.ID, &out.ID *out = new(string) **out = **in } + if in.IgnoreVulnerabilityAlertsDuringRead != nil { + in, out := &in.IgnoreVulnerabilityAlertsDuringRead, &out.IgnoreVulnerabilityAlertsDuringRead + *out = new(bool) + **out = **in + } + if in.IsTemplate != nil { + in, out := &in.IsTemplate, &out.IsTemplate + *out = new(bool) + **out = **in + } + if in.LicenseTemplate != nil { + in, out := &in.LicenseTemplate, &out.LicenseTemplate + *out = new(string) + **out = **in + } + if in.MergeCommitMessage != nil { + in, out := &in.MergeCommitMessage, &out.MergeCommitMessage + *out = new(string) + **out = **in + } + if in.MergeCommitTitle != nil { + in, out := &in.MergeCommitTitle, &out.MergeCommitTitle + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.NodeID != nil { in, out := &in.NodeID, &out.NodeID *out = new(string) @@ -1334,6 +2140,11 @@ func (in *RepositoryObservation) DeepCopyInto(out *RepositoryObservation) { (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.Private != nil { + in, out := &in.Private, &out.Private + *out = new(bool) + **out = **in + } if in.RepoID != nil { in, out := &in.RepoID, &out.RepoID *out = new(float64) @@ -1344,11 +2155,56 @@ func (in *RepositoryObservation) DeepCopyInto(out *RepositoryObservation) { *out = new(string) **out = **in } + if in.SecurityAndAnalysis != nil { + in, out := &in.SecurityAndAnalysis, &out.SecurityAndAnalysis + *out = make([]SecurityAndAnalysisObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SquashMergeCommitMessage != nil { + in, out := &in.SquashMergeCommitMessage, &out.SquashMergeCommitMessage + *out = new(string) + **out = **in + } + if in.SquashMergeCommitTitle != nil { + in, out := &in.SquashMergeCommitTitle, &out.SquashMergeCommitTitle + *out = new(string) + **out = **in + } if in.SvnURL != nil { in, out := &in.SvnURL, &out.SvnURL *out = new(string) **out = **in } + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = make([]TemplateObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Topics != nil { + in, out := &in.Topics, &out.Topics + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } + if in.VulnerabilityAlerts != nil { + in, out := &in.VulnerabilityAlerts, &out.VulnerabilityAlerts + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryObservation. @@ -1558,6 +2414,7 @@ func (in *RepositorySpec) DeepCopyInto(out *RepositorySpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositorySpec. @@ -1577,12 +2434,74 @@ func (in *RepositoryStatus) DeepCopyInto(out *RepositoryStatus) { in.AtProvider.DeepCopyInto(&out.AtProvider) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryStatus. -func (in *RepositoryStatus) DeepCopy() *RepositoryStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryStatus. +func (in *RepositoryStatus) DeepCopy() *RepositoryStatus { + if in == nil { + return nil + } + out := new(RepositoryStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequiredPullRequestReviewsInitParameters) DeepCopyInto(out *RequiredPullRequestReviewsInitParameters) { + *out = *in + if in.DismissStaleReviews != nil { + in, out := &in.DismissStaleReviews, &out.DismissStaleReviews + *out = new(bool) + **out = **in + } + if in.DismissalRestrictions != nil { + in, out := &in.DismissalRestrictions, &out.DismissalRestrictions + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PullRequestBypassers != nil { + in, out := &in.PullRequestBypassers, &out.PullRequestBypassers + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.RequireCodeOwnerReviews != nil { + in, out := &in.RequireCodeOwnerReviews, &out.RequireCodeOwnerReviews + *out = new(bool) + **out = **in + } + if in.RequireLastPushApproval != nil { + in, out := &in.RequireLastPushApproval, &out.RequireLastPushApproval + *out = new(bool) + **out = **in + } + if in.RequiredApprovingReviewCount != nil { + in, out := &in.RequiredApprovingReviewCount, &out.RequiredApprovingReviewCount + *out = new(float64) + **out = **in + } + if in.RestrictDismissals != nil { + in, out := &in.RestrictDismissals, &out.RestrictDismissals + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredPullRequestReviewsInitParameters. +func (in *RequiredPullRequestReviewsInitParameters) DeepCopy() *RequiredPullRequestReviewsInitParameters { if in == nil { return nil } - out := new(RepositoryStatus) + out := new(RequiredPullRequestReviewsInitParameters) in.DeepCopyInto(out) return out } @@ -1590,6 +2509,53 @@ func (in *RepositoryStatus) DeepCopy() *RepositoryStatus { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RequiredPullRequestReviewsObservation) DeepCopyInto(out *RequiredPullRequestReviewsObservation) { *out = *in + if in.DismissStaleReviews != nil { + in, out := &in.DismissStaleReviews, &out.DismissStaleReviews + *out = new(bool) + **out = **in + } + if in.DismissalRestrictions != nil { + in, out := &in.DismissalRestrictions, &out.DismissalRestrictions + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.PullRequestBypassers != nil { + in, out := &in.PullRequestBypassers, &out.PullRequestBypassers + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.RequireCodeOwnerReviews != nil { + in, out := &in.RequireCodeOwnerReviews, &out.RequireCodeOwnerReviews + *out = new(bool) + **out = **in + } + if in.RequireLastPushApproval != nil { + in, out := &in.RequireLastPushApproval, &out.RequireLastPushApproval + *out = new(bool) + **out = **in + } + if in.RequiredApprovingReviewCount != nil { + in, out := &in.RequiredApprovingReviewCount, &out.RequiredApprovingReviewCount + *out = new(float64) + **out = **in + } + if in.RestrictDismissals != nil { + in, out := &in.RestrictDismissals, &out.RestrictDismissals + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredPullRequestReviewsObservation. @@ -1664,9 +2630,56 @@ func (in *RequiredPullRequestReviewsParameters) DeepCopy() *RequiredPullRequestR return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequiredStatusChecksInitParameters) DeepCopyInto(out *RequiredStatusChecksInitParameters) { + *out = *in + if in.Contexts != nil { + in, out := &in.Contexts, &out.Contexts + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Strict != nil { + in, out := &in.Strict, &out.Strict + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredStatusChecksInitParameters. +func (in *RequiredStatusChecksInitParameters) DeepCopy() *RequiredStatusChecksInitParameters { + if in == nil { + return nil + } + out := new(RequiredStatusChecksInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RequiredStatusChecksObservation) DeepCopyInto(out *RequiredStatusChecksObservation) { *out = *in + if in.Contexts != nil { + in, out := &in.Contexts, &out.Contexts + *out = make([]*string, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(string) + **out = **in + } + } + } + if in.Strict != nil { + in, out := &in.Strict, &out.Strict + *out = new(bool) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequiredStatusChecksObservation. @@ -1710,9 +2723,34 @@ func (in *RequiredStatusChecksParameters) DeepCopy() *RequiredStatusChecksParame return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretScanningInitParameters) DeepCopyInto(out *SecretScanningInitParameters) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretScanningInitParameters. +func (in *SecretScanningInitParameters) DeepCopy() *SecretScanningInitParameters { + if in == nil { + return nil + } + out := new(SecretScanningInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecretScanningObservation) DeepCopyInto(out *SecretScanningObservation) { *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretScanningObservation. @@ -1745,9 +2783,34 @@ func (in *SecretScanningParameters) DeepCopy() *SecretScanningParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecretScanningPushProtectionInitParameters) DeepCopyInto(out *SecretScanningPushProtectionInitParameters) { + *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretScanningPushProtectionInitParameters. +func (in *SecretScanningPushProtectionInitParameters) DeepCopy() *SecretScanningPushProtectionInitParameters { + if in == nil { + return nil + } + out := new(SecretScanningPushProtectionInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecretScanningPushProtectionObservation) DeepCopyInto(out *SecretScanningPushProtectionObservation) { *out = *in + if in.Status != nil { + in, out := &in.Status, &out.Status + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretScanningPushProtectionObservation. @@ -1780,9 +2843,66 @@ func (in *SecretScanningPushProtectionParameters) DeepCopy() *SecretScanningPush return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SecurityAndAnalysisInitParameters) DeepCopyInto(out *SecurityAndAnalysisInitParameters) { + *out = *in + if in.AdvancedSecurity != nil { + in, out := &in.AdvancedSecurity, &out.AdvancedSecurity + *out = make([]AdvancedSecurityInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecretScanning != nil { + in, out := &in.SecretScanning, &out.SecretScanning + *out = make([]SecretScanningInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecretScanningPushProtection != nil { + in, out := &in.SecretScanningPushProtection, &out.SecretScanningPushProtection + *out = make([]SecretScanningPushProtectionInitParameters, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityAndAnalysisInitParameters. +func (in *SecurityAndAnalysisInitParameters) DeepCopy() *SecurityAndAnalysisInitParameters { + if in == nil { + return nil + } + out := new(SecurityAndAnalysisInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecurityAndAnalysisObservation) DeepCopyInto(out *SecurityAndAnalysisObservation) { *out = *in + if in.AdvancedSecurity != nil { + in, out := &in.AdvancedSecurity, &out.AdvancedSecurity + *out = make([]AdvancedSecurityObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecretScanning != nil { + in, out := &in.SecretScanning, &out.SecretScanning + *out = make([]SecretScanningObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.SecretScanningPushProtection != nil { + in, out := &in.SecretScanningPushProtection, &out.SecretScanningPushProtection + *out = make([]SecretScanningPushProtectionObservation, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityAndAnalysisObservation. @@ -1831,9 +2951,44 @@ func (in *SecurityAndAnalysisParameters) DeepCopy() *SecurityAndAnalysisParamete return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *SourceInitParameters) DeepCopyInto(out *SourceInitParameters) { + *out = *in + if in.Branch != nil { + in, out := &in.Branch, &out.Branch + *out = new(string) + **out = **in + } + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceInitParameters. +func (in *SourceInitParameters) DeepCopy() *SourceInitParameters { + if in == nil { + return nil + } + out := new(SourceInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SourceObservation) DeepCopyInto(out *SourceObservation) { *out = *in + if in.Branch != nil { + in, out := &in.Branch, &out.Branch + *out = new(string) + **out = **in + } + if in.Path != nil { + in, out := &in.Path, &out.Path + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceObservation. @@ -1871,9 +3026,54 @@ func (in *SourceParameters) DeepCopy() *SourceParameters { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TemplateInitParameters) DeepCopyInto(out *TemplateInitParameters) { + *out = *in + if in.IncludeAllBranches != nil { + in, out := &in.IncludeAllBranches, &out.IncludeAllBranches + *out = new(bool) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInitParameters. +func (in *TemplateInitParameters) DeepCopy() *TemplateInitParameters { + if in == nil { + return nil + } + out := new(TemplateInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TemplateObservation) DeepCopyInto(out *TemplateObservation) { *out = *in + if in.IncludeAllBranches != nil { + in, out := &in.IncludeAllBranches, &out.IncludeAllBranches + *out = new(bool) + **out = **in + } + if in.Owner != nil { + in, out := &in.Owner, &out.Owner + *out = new(string) + **out = **in + } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateObservation. diff --git a/apis/repo/v1alpha1/zz_generated_terraformed.go b/apis/repo/v1alpha1/zz_generated_terraformed.go index 1b81ac7..46d9848 100755 --- a/apis/repo/v1alpha1/zz_generated_terraformed.go +++ b/apis/repo/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Branch @@ -69,6 +74,46 @@ func (tr *Branch) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Branch +func (tr *Branch) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Branch +func (tr *Branch) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Branch using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Branch) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *DefaultBranch) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this DefaultBranch +func (tr *DefaultBranch) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DefaultBranch +func (tr *DefaultBranch) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this DefaultBranch using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *DefaultBranch) LateInitialize(attrs []byte) (bool, error) { @@ -217,6 +302,46 @@ func (tr *BranchProtection) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this BranchProtection +func (tr *BranchProtection) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this BranchProtection +func (tr *BranchProtection) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this BranchProtection using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *BranchProtection) LateInitialize(attrs []byte) (bool, error) { @@ -291,6 +416,46 @@ func (tr *Repository) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Repository +func (tr *Repository) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Repository +func (tr *Repository) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Repository using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Repository) LateInitialize(attrs []byte) (bool, error) { @@ -367,6 +532,46 @@ func (tr *DeployKey) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this DeployKey +func (tr *DeployKey) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DeployKey +func (tr *DeployKey) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this DeployKey using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *DeployKey) LateInitialize(attrs []byte) (bool, error) { @@ -441,6 +646,46 @@ func (tr *RepositoryFile) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this RepositoryFile +func (tr *RepositoryFile) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this RepositoryFile +func (tr *RepositoryFile) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RepositoryFile using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RepositoryFile) LateInitialize(attrs []byte) (bool, error) { @@ -515,6 +760,46 @@ func (tr *PullRequest) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this PullRequest +func (tr *PullRequest) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this PullRequest +func (tr *PullRequest) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this PullRequest using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *PullRequest) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/repo/v1alpha1/zz_groupversion_info.go b/apis/repo/v1alpha1/zz_groupversion_info.go index f8c8933..b46b660 100755 --- a/apis/repo/v1alpha1/zz_groupversion_info.go +++ b/apis/repo/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -5,7 +9,7 @@ Copyright 2022 Upbound Inc. // Code generated by upjet. DO NOT EDIT. // +kubebuilder:object:generate=true -// +groupName=repo.github.upbound.io +// +groupName=repo.template.upbound.io // +versionName=v1alpha1 package v1alpha1 @@ -16,7 +20,7 @@ import ( // Package type metadata. const ( - CRDGroup = "repo.github.upbound.io" + CRDGroup = "repo.template.upbound.io" CRDVersion = "v1alpha1" ) diff --git a/apis/repo/v1alpha1/zz_pullrequest_types.go b/apis/repo/v1alpha1/zz_pullrequest_types.go index 71eae3b..63cb8d5 100755 --- a/apis/repo/v1alpha1/zz_pullrequest_types.go +++ b/apis/repo/v1alpha1/zz_pullrequest_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,14 +17,44 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type PullRequestInitParameters struct { + + // Name of the branch serving as the base of the Pull Request. + BaseRef *string `json:"baseRef,omitempty" tf:"base_ref,omitempty"` + + // Body of the Pull Request. + Body *string `json:"body,omitempty" tf:"body,omitempty"` + + // Controls whether the base repository maintainers can modify the Pull Request. Default: false. + MaintainerCanModify *bool `json:"maintainerCanModify,omitempty" tf:"maintainer_can_modify,omitempty"` + + // Owner of the repository. If not provided, the provider's default owner is used. + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + // The title of the Pull Request. + Title *string `json:"title,omitempty" tf:"title,omitempty"` +} + type PullRequestObservation struct { + // Name of the branch serving as the base of the Pull Request. + BaseRef *string `json:"baseRef,omitempty" tf:"base_ref,omitempty"` + + // Name of the base repository to retrieve the Pull Requests from. + BaseRepository *string `json:"baseRepository,omitempty" tf:"base_repository,omitempty"` + // Head commit SHA of the Pull Request base. BaseSha *string `json:"baseSha,omitempty" tf:"base_sha,omitempty"` + // Body of the Pull Request. + Body *string `json:"body,omitempty" tf:"body,omitempty"` + // Indicates Whether this Pull Request is a draft. Draft *bool `json:"draft,omitempty" tf:"draft,omitempty"` + // Name of the branch serving as the head of the Pull Request. + HeadRef *string `json:"headRef,omitempty" tf:"head_ref,omitempty"` + // Head commit SHA of the Pull Request head. HeadSha *string `json:"headSha,omitempty" tf:"head_sha,omitempty"` @@ -30,6 +64,9 @@ type PullRequestObservation struct { // List of names of labels on the PR Labels []*string `json:"labels,omitempty" tf:"labels,omitempty"` + // Controls whether the base repository maintainers can modify the Pull Request. Default: false. + MaintainerCanModify *bool `json:"maintainerCanModify,omitempty" tf:"maintainer_can_modify,omitempty"` + // The number of the Pull Request within the repository. Number *float64 `json:"number,omitempty" tf:"number,omitempty"` @@ -40,9 +77,15 @@ type PullRequestObservation struct { // Username of the PR creator OpenedBy *string `json:"openedBy,omitempty" tf:"opened_by,omitempty"` + // Owner of the repository. If not provided, the provider's default owner is used. + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + // the current Pull Request state - can be "open", "closed" or "merged". State *string `json:"state,omitempty" tf:"state,omitempty"` + // The title of the Pull Request. + Title *string `json:"title,omitempty" tf:"title,omitempty"` + // The timestamp of the last Pull Request update. UpdatedAt *float64 `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` } @@ -50,8 +93,8 @@ type PullRequestObservation struct { type PullRequestParameters struct { // Name of the branch serving as the base of the Pull Request. - // +kubebuilder:validation:Required - BaseRef *string `json:"baseRef" tf:"base_ref,omitempty"` + // +kubebuilder:validation:Optional + BaseRef *string `json:"baseRef,omitempty" tf:"base_ref,omitempty"` // Name of the base repository to retrieve the Pull Requests from. // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Repository @@ -92,14 +135,25 @@ type PullRequestParameters struct { Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` // The title of the Pull Request. - // +kubebuilder:validation:Required - Title *string `json:"title" tf:"title,omitempty"` + // +kubebuilder:validation:Optional + Title *string `json:"title,omitempty" tf:"title,omitempty"` } // PullRequestSpec defines the desired state of PullRequest type PullRequestSpec struct { v1.ResourceSpec `json:",inline"` ForProvider PullRequestParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider PullRequestInitParameters `json:"initProvider,omitempty"` } // PullRequestStatus defines the observed state of PullRequest. @@ -120,8 +174,10 @@ type PullRequestStatus struct { type PullRequest struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec PullRequestSpec `json:"spec"` - Status PullRequestStatus `json:"status,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.baseRef) || (has(self.initProvider) && has(self.initProvider.baseRef))",message="spec.forProvider.baseRef is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.title) || (has(self.initProvider) && has(self.initProvider.title))",message="spec.forProvider.title is a required parameter" + Spec PullRequestSpec `json:"spec"` + Status PullRequestStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/repo/v1alpha1/zz_repository_types.go b/apis/repo/v1alpha1/zz_repository_types.go index 9a96135..a838508 100755 --- a/apis/repo/v1alpha1/zz_repository_types.go +++ b/apis/repo/v1alpha1/zz_repository_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,24 +17,48 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type AdvancedSecurityInitParameters struct { + + // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. + Status *string `json:"status,omitempty" tf:"status,omitempty"` +} + type AdvancedSecurityObservation struct { + + // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. + Status *string `json:"status,omitempty" tf:"status,omitempty"` } type AdvancedSecurityParameters struct { // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Status *string `json:"status" tf:"status,omitempty"` } +type PagesInitParameters struct { + + // The custom domain for the repository. This can only be set after the repository has been created. + Cname *string `json:"cname,omitempty" tf:"cname,omitempty"` + + // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + Source []SourceInitParameters `json:"source,omitempty" tf:"source,omitempty"` +} + type PagesObservation struct { + // The custom domain for the repository. This can only be set after the repository has been created. + Cname *string `json:"cname,omitempty" tf:"cname,omitempty"` + // Whether the rendered GitHub Pages site has a custom 404 page. Custom404 *bool `json:"custom404,omitempty" tf:"custom_404,omitempty"` // URL to the repository on the web. HTMLURL *string `json:"htmlUrl,omitempty" tf:"html_url,omitempty"` + // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. + Source []SourceObservation `json:"source,omitempty" tf:"source,omitempty"` + // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. Status *string `json:"status,omitempty" tf:"status,omitempty"` @@ -44,11 +72,157 @@ type PagesParameters struct { Cname *string `json:"cname,omitempty" tf:"cname,omitempty"` // The source branch and directory for the rendered Pages site. See GitHub Pages Source below for details. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Source []SourceParameters `json:"source" tf:"source,omitempty"` } +type RepositoryInitParameters struct { + + // Set to true to allow auto-merging pull requests on the repository. + AllowAutoMerge *bool `json:"allowAutoMerge,omitempty" tf:"allow_auto_merge,omitempty"` + + // Set to false to disable merge commits on the repository. + AllowMergeCommit *bool `json:"allowMergeCommit,omitempty" tf:"allow_merge_commit,omitempty"` + + // Set to false to disable rebase merges on the repository. + AllowRebaseMerge *bool `json:"allowRebaseMerge,omitempty" tf:"allow_rebase_merge,omitempty"` + + // Set to false to disable squash merges on the repository. + AllowSquashMerge *bool `json:"allowSquashMerge,omitempty" tf:"allow_squash_merge,omitempty"` + + // Set to true to always suggest updating pull request branches. + AllowUpdateBranch *bool `json:"allowUpdateBranch,omitempty" tf:"allow_update_branch,omitempty"` + + // Set to true to archive the repository instead of deleting on destroy. + ArchiveOnDestroy *bool `json:"archiveOnDestroy,omitempty" tf:"archive_on_destroy,omitempty"` + + // Specifies if the repository should be archived. Defaults to false. NOTE Currently, the API does not support unarchiving. + Archived *bool `json:"archived,omitempty" tf:"archived,omitempty"` + + // Set to true to produce an initial commit in the repository. + AutoInit *bool `json:"autoInit,omitempty" tf:"auto_init,omitempty"` + + // (Deprecated: Use github_branch_default resource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, + // and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the + // initial repository creation and create the target branch inside of the repository prior to setting this attribute. + // Can only be set after initial repository creation, and only if the target branch exists + DefaultBranch *string `json:"defaultBranch,omitempty" tf:"default_branch,omitempty"` + + // Automatically delete head branch after a pull request is merged. Defaults to false. + DeleteBranchOnMerge *bool `json:"deleteBranchOnMerge,omitempty" tf:"delete_branch_on_merge,omitempty"` + + // A description of the repository. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // Use the name of the template without the extension. For example, "Haskell". + GitignoreTemplate *string `json:"gitignoreTemplate,omitempty" tf:"gitignore_template,omitempty"` + + // Set to true to enable GitHub Discussions on the repository. Defaults to false. + HasDiscussions *bool `json:"hasDiscussions,omitempty" tf:"has_discussions,omitempty"` + + // Set to true to enable the (deprecated) downloads features on the repository. + HasDownloads *bool `json:"hasDownloads,omitempty" tf:"has_downloads,omitempty"` + + // Set to true to enable the GitHub Issues features + // on the repository. + HasIssues *bool `json:"hasIssues,omitempty" tf:"has_issues,omitempty"` + + // Set to true to enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default to false and will otherwise default to true. If you specify true when it has been disabled it will return an error. + HasProjects *bool `json:"hasProjects,omitempty" tf:"has_projects,omitempty"` + + // Set to true to enable the GitHub Wiki features on + // the repository. + HasWiki *bool `json:"hasWiki,omitempty" tf:"has_wiki,omitempty"` + + // URL of a page describing the project. + HomepageURL *string `json:"homepageUrl,omitempty" tf:"homepage_url,omitempty"` + + // Set to true to not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. + IgnoreVulnerabilityAlertsDuringRead *bool `json:"ignoreVulnerabilityAlertsDuringRead,omitempty" tf:"ignore_vulnerability_alerts_during_read,omitempty"` + + // Set to true to tell GitHub that this is a template repository. + IsTemplate *bool `json:"isTemplate,omitempty" tf:"is_template,omitempty"` + + // Use the name of the template without the extension. For example, "mit" or "mpl-2.0". + LicenseTemplate *string `json:"licenseTemplate,omitempty" tf:"license_template,omitempty"` + + // Can be PR_BODY, PR_TITLE, or BLANK for a default merge commit message. + MergeCommitMessage *string `json:"mergeCommitMessage,omitempty" tf:"merge_commit_message,omitempty"` + + // Can be PR_TITLE or MERGE_MESSAGE for a default merge commit title. + MergeCommitTitle *string `json:"mergeCommitTitle,omitempty" tf:"merge_commit_title,omitempty"` + + // The name of the repository. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details. + Pages []PagesInitParameters `json:"pages,omitempty" tf:"pages,omitempty"` + + // Set to true to create a private repository. + // Repositories are created as public (e.g. open source) by default. + Private *bool `json:"private,omitempty" tf:"private,omitempty"` + + // The repository's security and analysis configuration. See Security and Analysis Configuration below for details. + // Security and analysis settings for the repository. To use this parameter you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. + SecurityAndAnalysis []SecurityAndAnalysisInitParameters `json:"securityAndAnalysis,omitempty" tf:"security_and_analysis,omitempty"` + + // Can be PR_BODY, COMMIT_MESSAGES, or BLANK for a default squash merge commit message. + SquashMergeCommitMessage *string `json:"squashMergeCommitMessage,omitempty" tf:"squash_merge_commit_message,omitempty"` + + // Can be PR_TITLE or COMMIT_OR_PR_TITLE for a default squash merge commit title. + SquashMergeCommitTitle *string `json:"squashMergeCommitTitle,omitempty" tf:"squash_merge_commit_title,omitempty"` + + // Use a template repository to create this resource. See Template Repositories below for details. + Template []TemplateInitParameters `json:"template,omitempty" tf:"template,omitempty"` + + // The list of topics of the repository. + Topics []*string `json:"topics,omitempty" tf:"topics,omitempty"` + + // Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter. + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` + + // Set to true to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings. + VulnerabilityAlerts *bool `json:"vulnerabilityAlerts,omitempty" tf:"vulnerability_alerts,omitempty"` +} + type RepositoryObservation struct { + + // Set to true to allow auto-merging pull requests on the repository. + AllowAutoMerge *bool `json:"allowAutoMerge,omitempty" tf:"allow_auto_merge,omitempty"` + + // Set to false to disable merge commits on the repository. + AllowMergeCommit *bool `json:"allowMergeCommit,omitempty" tf:"allow_merge_commit,omitempty"` + + // Set to false to disable rebase merges on the repository. + AllowRebaseMerge *bool `json:"allowRebaseMerge,omitempty" tf:"allow_rebase_merge,omitempty"` + + // Set to false to disable squash merges on the repository. + AllowSquashMerge *bool `json:"allowSquashMerge,omitempty" tf:"allow_squash_merge,omitempty"` + + // Set to true to always suggest updating pull request branches. + AllowUpdateBranch *bool `json:"allowUpdateBranch,omitempty" tf:"allow_update_branch,omitempty"` + + // Set to true to archive the repository instead of deleting on destroy. + ArchiveOnDestroy *bool `json:"archiveOnDestroy,omitempty" tf:"archive_on_destroy,omitempty"` + + // Specifies if the repository should be archived. Defaults to false. NOTE Currently, the API does not support unarchiving. + Archived *bool `json:"archived,omitempty" tf:"archived,omitempty"` + + // Set to true to produce an initial commit in the repository. + AutoInit *bool `json:"autoInit,omitempty" tf:"auto_init,omitempty"` + + // (Deprecated: Use github_branch_default resource instead) The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, + // and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the + // initial repository creation and create the target branch inside of the repository prior to setting this attribute. + // Can only be set after initial repository creation, and only if the target branch exists + DefaultBranch *string `json:"defaultBranch,omitempty" tf:"default_branch,omitempty"` + + // Automatically delete head branch after a pull request is merged. Defaults to false. + DeleteBranchOnMerge *bool `json:"deleteBranchOnMerge,omitempty" tf:"delete_branch_on_merge,omitempty"` + + // A description of the repository. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` // A string of the form "orgname/reponame". @@ -57,29 +231,95 @@ type RepositoryObservation struct { // URL that can be provided to git clone to clone the repository anonymously via the git protocol. GitCloneURL *string `json:"gitCloneUrl,omitempty" tf:"git_clone_url,omitempty"` + // Use the name of the template without the extension. For example, "Haskell". + GitignoreTemplate *string `json:"gitignoreTemplate,omitempty" tf:"gitignore_template,omitempty"` + // URL to the repository on the web. HTMLURL *string `json:"htmlUrl,omitempty" tf:"html_url,omitempty"` // URL that can be provided to git clone to clone the repository via HTTPS. HTTPCloneURL *string `json:"httpCloneUrl,omitempty" tf:"http_clone_url,omitempty"` + // Set to true to enable GitHub Discussions on the repository. Defaults to false. + HasDiscussions *bool `json:"hasDiscussions,omitempty" tf:"has_discussions,omitempty"` + + // Set to true to enable the (deprecated) downloads features on the repository. + HasDownloads *bool `json:"hasDownloads,omitempty" tf:"has_downloads,omitempty"` + + // Set to true to enable the GitHub Issues features + // on the repository. + HasIssues *bool `json:"hasIssues,omitempty" tf:"has_issues,omitempty"` + + // Set to true to enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default to false and will otherwise default to true. If you specify true when it has been disabled it will return an error. + HasProjects *bool `json:"hasProjects,omitempty" tf:"has_projects,omitempty"` + + // Set to true to enable the GitHub Wiki features on + // the repository. + HasWiki *bool `json:"hasWiki,omitempty" tf:"has_wiki,omitempty"` + + // URL of a page describing the project. + HomepageURL *string `json:"homepageUrl,omitempty" tf:"homepage_url,omitempty"` + ID *string `json:"id,omitempty" tf:"id,omitempty"` + // Set to true to not call the vulnerability alerts endpoint so the resource can also be used without admin permissions during read. + IgnoreVulnerabilityAlertsDuringRead *bool `json:"ignoreVulnerabilityAlertsDuringRead,omitempty" tf:"ignore_vulnerability_alerts_during_read,omitempty"` + + // Set to true to tell GitHub that this is a template repository. + IsTemplate *bool `json:"isTemplate,omitempty" tf:"is_template,omitempty"` + + // Use the name of the template without the extension. For example, "mit" or "mpl-2.0". + LicenseTemplate *string `json:"licenseTemplate,omitempty" tf:"license_template,omitempty"` + + // Can be PR_BODY, PR_TITLE, or BLANK for a default merge commit message. + MergeCommitMessage *string `json:"mergeCommitMessage,omitempty" tf:"merge_commit_message,omitempty"` + + // Can be PR_TITLE or MERGE_MESSAGE for a default merge commit title. + MergeCommitTitle *string `json:"mergeCommitTitle,omitempty" tf:"merge_commit_title,omitempty"` + + // The name of the repository. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + // GraphQL global node id for use with v4 API NodeID *string `json:"nodeId,omitempty" tf:"node_id,omitempty"` // The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details. - // +kubebuilder:validation:Optional Pages []PagesObservation `json:"pages,omitempty" tf:"pages,omitempty"` + // Set to true to create a private repository. + // Repositories are created as public (e.g. open source) by default. + Private *bool `json:"private,omitempty" tf:"private,omitempty"` + // GitHub ID for the repository RepoID *float64 `json:"repoId,omitempty" tf:"repo_id,omitempty"` // URL that can be provided to git clone to clone the repository via SSH. SSHCloneURL *string `json:"sshCloneUrl,omitempty" tf:"ssh_clone_url,omitempty"` + // The repository's security and analysis configuration. See Security and Analysis Configuration below for details. + // Security and analysis settings for the repository. To use this parameter you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. + SecurityAndAnalysis []SecurityAndAnalysisObservation `json:"securityAndAnalysis,omitempty" tf:"security_and_analysis,omitempty"` + + // Can be PR_BODY, COMMIT_MESSAGES, or BLANK for a default squash merge commit message. + SquashMergeCommitMessage *string `json:"squashMergeCommitMessage,omitempty" tf:"squash_merge_commit_message,omitempty"` + + // Can be PR_TITLE or COMMIT_OR_PR_TITLE for a default squash merge commit title. + SquashMergeCommitTitle *string `json:"squashMergeCommitTitle,omitempty" tf:"squash_merge_commit_title,omitempty"` + // URL that can be provided to svn checkout to check out the repository via GitHub's Subversion protocol emulation. SvnURL *string `json:"svnUrl,omitempty" tf:"svn_url,omitempty"` + + // Use a template repository to create this resource. See Template Repositories below for details. + Template []TemplateObservation `json:"template,omitempty" tf:"template,omitempty"` + + // The list of topics of the repository. + Topics []*string `json:"topics,omitempty" tf:"topics,omitempty"` + + // Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter. + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` + + // Set to true to enable security alerts for vulnerable dependencies. Enabling requires alerts to be enabled on the owner level. (Note for importing: GitHub enables the alerts on public repos but disables them on private repos by default.) See GitHub Documentation for details. Note that vulnerability alerts have not been successfully tested on any GitHub Enterprise instance and may be unavailable in those settings. + VulnerabilityAlerts *bool `json:"vulnerabilityAlerts,omitempty" tf:"vulnerability_alerts,omitempty"` } type RepositoryParameters struct { @@ -182,8 +422,8 @@ type RepositoryParameters struct { MergeCommitTitle *string `json:"mergeCommitTitle,omitempty" tf:"merge_commit_title,omitempty"` // The name of the repository. - // +kubebuilder:validation:Required - Name *string `json:"name" tf:"name,omitempty"` + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` // The repository's GitHub Pages configuration. See GitHub Pages Configuration below for details. // +kubebuilder:validation:Optional @@ -224,27 +464,66 @@ type RepositoryParameters struct { VulnerabilityAlerts *bool `json:"vulnerabilityAlerts,omitempty" tf:"vulnerability_alerts,omitempty"` } +type SecretScanningInitParameters struct { + + // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. + Status *string `json:"status,omitempty" tf:"status,omitempty"` +} + type SecretScanningObservation struct { + + // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. + Status *string `json:"status,omitempty" tf:"status,omitempty"` } type SecretScanningParameters struct { // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Status *string `json:"status" tf:"status,omitempty"` } +type SecretScanningPushProtectionInitParameters struct { + + // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. + Status *string `json:"status,omitempty" tf:"status,omitempty"` +} + type SecretScanningPushProtectionObservation struct { + + // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. + Status *string `json:"status,omitempty" tf:"status,omitempty"` } type SecretScanningPushProtectionParameters struct { // Set to enabled to enable secret scanning on the repository. Can be enabled or disabled. If set to enabled, the repository's visibility must be public or security_and_analysis[0].advanced_security[0].status must also be set to enabled. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Status *string `json:"status" tf:"status,omitempty"` } +type SecurityAndAnalysisInitParameters struct { + + // The advanced security configuration for the repository. See Advanced Security Configuration below for details. If a repository's visibility is public, advanced security is always enabled and cannot be changed, so this setting cannot be supplied. + AdvancedSecurity []AdvancedSecurityInitParameters `json:"advancedSecurity,omitempty" tf:"advanced_security,omitempty"` + + // The secret scanning configuration for the repository. See Secret Scanning Configuration below for details. + SecretScanning []SecretScanningInitParameters `json:"secretScanning,omitempty" tf:"secret_scanning,omitempty"` + + // The secret scanning push protection configuration for the repository. See Secret Scanning Push Protection Configuration below for details. + SecretScanningPushProtection []SecretScanningPushProtectionInitParameters `json:"secretScanningPushProtection,omitempty" tf:"secret_scanning_push_protection,omitempty"` +} + type SecurityAndAnalysisObservation struct { + + // The advanced security configuration for the repository. See Advanced Security Configuration below for details. If a repository's visibility is public, advanced security is always enabled and cannot be changed, so this setting cannot be supplied. + AdvancedSecurity []AdvancedSecurityObservation `json:"advancedSecurity,omitempty" tf:"advanced_security,omitempty"` + + // The secret scanning configuration for the repository. See Secret Scanning Configuration below for details. + SecretScanning []SecretScanningObservation `json:"secretScanning,omitempty" tf:"secret_scanning,omitempty"` + + // The secret scanning push protection configuration for the repository. See Secret Scanning Push Protection Configuration below for details. + SecretScanningPushProtection []SecretScanningPushProtectionObservation `json:"secretScanningPushProtection,omitempty" tf:"secret_scanning_push_protection,omitempty"` } type SecurityAndAnalysisParameters struct { @@ -262,13 +541,28 @@ type SecurityAndAnalysisParameters struct { SecretScanningPushProtection []SecretScanningPushProtectionParameters `json:"secretScanningPushProtection,omitempty" tf:"secret_scanning_push_protection,omitempty"` } +type SourceInitParameters struct { + + // The repository branch used to publish the site's source files. (i.e. main or gh-pages. + Branch *string `json:"branch,omitempty" tf:"branch,omitempty"` + + // The repository directory from which the site publishes (Default: /). + Path *string `json:"path,omitempty" tf:"path,omitempty"` +} + type SourceObservation struct { + + // The repository branch used to publish the site's source files. (i.e. main or gh-pages. + Branch *string `json:"branch,omitempty" tf:"branch,omitempty"` + + // The repository directory from which the site publishes (Default: /). + Path *string `json:"path,omitempty" tf:"path,omitempty"` } type SourceParameters struct { // The repository branch used to publish the site's source files. (i.e. main or gh-pages. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Branch *string `json:"branch" tf:"branch,omitempty"` // The repository directory from which the site publishes (Default: /). @@ -276,7 +570,28 @@ type SourceParameters struct { Path *string `json:"path,omitempty" tf:"path,omitempty"` } +type TemplateInitParameters struct { + + // : Whether the new repository should include all the branches from the template repository (defaults to false, which includes only the default branch from the template). + IncludeAllBranches *bool `json:"includeAllBranches,omitempty" tf:"include_all_branches,omitempty"` + + // : The GitHub organization or user the template repository is owned by. + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + // : The name of the template repository. + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` +} + type TemplateObservation struct { + + // : Whether the new repository should include all the branches from the template repository (defaults to false, which includes only the default branch from the template). + IncludeAllBranches *bool `json:"includeAllBranches,omitempty" tf:"include_all_branches,omitempty"` + + // : The GitHub organization or user the template repository is owned by. + Owner *string `json:"owner,omitempty" tf:"owner,omitempty"` + + // : The name of the template repository. + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` } type TemplateParameters struct { @@ -286,11 +601,11 @@ type TemplateParameters struct { IncludeAllBranches *bool `json:"includeAllBranches,omitempty" tf:"include_all_branches,omitempty"` // : The GitHub organization or user the template repository is owned by. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Owner *string `json:"owner" tf:"owner,omitempty"` // : The name of the template repository. - // +kubebuilder:validation:Required + // +kubebuilder:validation:Optional Repository *string `json:"repository" tf:"repository,omitempty"` } @@ -298,6 +613,17 @@ type TemplateParameters struct { type RepositorySpec struct { v1.ResourceSpec `json:",inline"` ForProvider RepositoryParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider RepositoryInitParameters `json:"initProvider,omitempty"` } // RepositoryStatus defines the observed state of Repository. @@ -318,8 +644,9 @@ type RepositoryStatus struct { type Repository struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RepositorySpec `json:"spec"` - Status RepositoryStatus `json:"status,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + Spec RepositorySpec `json:"spec"` + Status RepositoryStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/repo/v1alpha1/zz_repositoryfile_types.go b/apis/repo/v1alpha1/zz_repositoryfile_types.go index 1ad5aea..4c080f5 100755 --- a/apis/repo/v1alpha1/zz_repositoryfile_types.go +++ b/apis/repo/v1alpha1/zz_repositoryfile_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,14 +17,74 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type RepositoryFileInitParameters struct { + + // Committer author name to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits. + // The commit author name, defaults to the authenticated user's name. GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. + CommitAuthor *string `json:"commitAuthor,omitempty" tf:"commit_author,omitempty"` + + // Committer email address to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits. + // The commit author email address, defaults to the authenticated user's email address. GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. + CommitEmail *string `json:"commitEmail,omitempty" tf:"commit_email,omitempty"` + + // Commit message when adding or updating the managed file. + // The commit message when creating, updating or deleting the file + CommitMessage *string `json:"commitMessage,omitempty" tf:"commit_message,omitempty"` + + // The file content. + // The file's content + Content *string `json:"content,omitempty" tf:"content,omitempty"` + + // The path of the file to manage. + // The file path to manage + File *string `json:"file,omitempty" tf:"file,omitempty"` + + // Enable overwriting existing files + // Enable overwriting existing files, defaults to "false" + OverwriteOnCreate *bool `json:"overwriteOnCreate,omitempty" tf:"overwrite_on_create,omitempty"` +} + type RepositoryFileObservation struct { + // Git branch (defaults to main). + // The branch must already exist, it will not be created if it does not already exist. + // The branch name, defaults to "main" + Branch *string `json:"branch,omitempty" tf:"branch,omitempty"` + + // Committer author name to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits. + // The commit author name, defaults to the authenticated user's name. GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. + CommitAuthor *string `json:"commitAuthor,omitempty" tf:"commit_author,omitempty"` + + // Committer email address to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This may be useful when a branch protection rule requires signed commits. + // The commit author email address, defaults to the authenticated user's email address. GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. + CommitEmail *string `json:"commitEmail,omitempty" tf:"commit_email,omitempty"` + + // Commit message when adding or updating the managed file. + // The commit message when creating, updating or deleting the file + CommitMessage *string `json:"commitMessage,omitempty" tf:"commit_message,omitempty"` + // The SHA of the commit that modified the file. // The SHA of the commit that modified the file CommitSha *string `json:"commitSha,omitempty" tf:"commit_sha,omitempty"` + // The file content. + // The file's content + Content *string `json:"content,omitempty" tf:"content,omitempty"` + + // The path of the file to manage. + // The file path to manage + File *string `json:"file,omitempty" tf:"file,omitempty"` + ID *string `json:"id,omitempty" tf:"id,omitempty"` + // Enable overwriting existing files + // Enable overwriting existing files, defaults to "false" + OverwriteOnCreate *bool `json:"overwriteOnCreate,omitempty" tf:"overwrite_on_create,omitempty"` + + // The repository to create the file in. + // The repository name + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + // The SHA blob of the file. // The blob SHA of the file Sha *string `json:"sha,omitempty" tf:"sha,omitempty"` @@ -60,13 +124,13 @@ type RepositoryFileParameters struct { // The file content. // The file's content - // +kubebuilder:validation:Required - Content *string `json:"content" tf:"content,omitempty"` + // +kubebuilder:validation:Optional + Content *string `json:"content,omitempty" tf:"content,omitempty"` // The path of the file to manage. // The file path to manage - // +kubebuilder:validation:Required - File *string `json:"file" tf:"file,omitempty"` + // +kubebuilder:validation:Optional + File *string `json:"file,omitempty" tf:"file,omitempty"` // Enable overwriting existing files // Enable overwriting existing files, defaults to "false" @@ -92,6 +156,17 @@ type RepositoryFileParameters struct { type RepositoryFileSpec struct { v1.ResourceSpec `json:",inline"` ForProvider RepositoryFileParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider RepositoryFileInitParameters `json:"initProvider,omitempty"` } // RepositoryFileStatus defines the observed state of RepositoryFile. @@ -112,8 +187,10 @@ type RepositoryFileStatus struct { type RepositoryFile struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec RepositoryFileSpec `json:"spec"` - Status RepositoryFileStatus `json:"status,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.content) || (has(self.initProvider) && has(self.initProvider.content))",message="spec.forProvider.content is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.file) || (has(self.initProvider) && has(self.initProvider.file))",message="spec.forProvider.file is a required parameter" + Spec RepositoryFileSpec `json:"spec"` + Status RepositoryFileStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/team/v1alpha1/zz_generated.deepcopy.go b/apis/team/v1alpha1/zz_generated.deepcopy.go index 8f85196..8375d5f 100644 --- a/apis/team/v1alpha1/zz_generated.deepcopy.go +++ b/apis/team/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. @@ -41,6 +40,51 @@ func (in *Team) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamInitParameters) DeepCopyInto(out *TeamInitParameters) { + *out = *in + if in.CreateDefaultMaintainer != nil { + in, out := &in.CreateDefaultMaintainer, &out.CreateDefaultMaintainer + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } + if in.LdapDn != nil { + in, out := &in.LdapDn, &out.LdapDn + *out = new(string) + **out = **in + } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } + if in.ParentTeamID != nil { + in, out := &in.ParentTeamID, &out.ParentTeamID + *out = new(float64) + **out = **in + } + if in.Privacy != nil { + in, out := &in.Privacy, &out.Privacy + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamInitParameters. +func (in *TeamInitParameters) DeepCopy() *TeamInitParameters { + if in == nil { + return nil + } + out := new(TeamInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TeamList) DeepCopyInto(out *TeamList) { *out = *in @@ -76,6 +120,16 @@ func (in *TeamList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TeamObservation) DeepCopyInto(out *TeamObservation) { *out = *in + if in.CreateDefaultMaintainer != nil { + in, out := &in.CreateDefaultMaintainer, &out.CreateDefaultMaintainer + *out = new(bool) + **out = **in + } + if in.Description != nil { + in, out := &in.Description, &out.Description + *out = new(string) + **out = **in + } if in.Etag != nil { in, out := &in.Etag, &out.Etag *out = new(string) @@ -86,16 +140,36 @@ func (in *TeamObservation) DeepCopyInto(out *TeamObservation) { *out = new(string) **out = **in } + if in.LdapDn != nil { + in, out := &in.LdapDn, &out.LdapDn + *out = new(string) + **out = **in + } if in.MembersCount != nil { in, out := &in.MembersCount, &out.MembersCount *out = new(float64) **out = **in } + if in.Name != nil { + in, out := &in.Name, &out.Name + *out = new(string) + **out = **in + } if in.NodeID != nil { in, out := &in.NodeID, &out.NodeID *out = new(string) **out = **in } + if in.ParentTeamID != nil { + in, out := &in.ParentTeamID, &out.ParentTeamID + *out = new(float64) + **out = **in + } + if in.Privacy != nil { + in, out := &in.Privacy, &out.Privacy + *out = new(string) + **out = **in + } if in.Slug != nil { in, out := &in.Slug, &out.Slug *out = new(string) @@ -185,6 +259,26 @@ func (in *TeamRepository) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TeamRepositoryInitParameters) DeepCopyInto(out *TeamRepositoryInitParameters) { + *out = *in + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamRepositoryInitParameters. +func (in *TeamRepositoryInitParameters) DeepCopy() *TeamRepositoryInitParameters { + if in == nil { + return nil + } + out := new(TeamRepositoryInitParameters) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *TeamRepositoryList) DeepCopyInto(out *TeamRepositoryList) { *out = *in @@ -230,6 +324,21 @@ func (in *TeamRepositoryObservation) DeepCopyInto(out *TeamRepositoryObservation *out = new(string) **out = **in } + if in.Permission != nil { + in, out := &in.Permission, &out.Permission + *out = new(string) + **out = **in + } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.TeamID != nil { + in, out := &in.TeamID, &out.TeamID + *out = new(string) + **out = **in + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamRepositoryObservation. @@ -297,6 +406,7 @@ func (in *TeamRepositorySpec) DeepCopyInto(out *TeamRepositorySpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamRepositorySpec. @@ -331,6 +441,7 @@ func (in *TeamSpec) DeepCopyInto(out *TeamSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamSpec. diff --git a/apis/team/v1alpha1/zz_generated_terraformed.go b/apis/team/v1alpha1/zz_generated_terraformed.go index aa6702d..bd0ddca 100755 --- a/apis/team/v1alpha1/zz_generated_terraformed.go +++ b/apis/team/v1alpha1/zz_generated_terraformed.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -7,10 +11,11 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" - "github.com/upbound/upjet/pkg/resource" - "github.com/upbound/upjet/pkg/resource/json" + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" ) // GetTerraformResourceType returns Terraform resource type for this Team @@ -69,6 +74,46 @@ func (tr *Team) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this Team +func (tr *Team) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Team +func (tr *Team) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Team using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Team) LateInitialize(attrs []byte) (bool, error) { @@ -143,6 +188,46 @@ func (tr *TeamRepository) SetParameters(params map[string]any) error { return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) } +// GetInitParameters of this TeamRepository +func (tr *TeamRepository) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this TeamRepository +func (tr *TeamRepository) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this TeamRepository using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *TeamRepository) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/team/v1alpha1/zz_groupversion_info.go b/apis/team/v1alpha1/zz_groupversion_info.go index 61e7d66..2a1d170 100755 --- a/apis/team/v1alpha1/zz_groupversion_info.go +++ b/apis/team/v1alpha1/zz_groupversion_info.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -5,7 +9,7 @@ Copyright 2022 Upbound Inc. // Code generated by upjet. DO NOT EDIT. // +kubebuilder:object:generate=true -// +groupName=team.github.upbound.io +// +groupName=team.template.upbound.io // +versionName=v1alpha1 package v1alpha1 @@ -16,7 +20,7 @@ import ( // Package type metadata. const ( - CRDGroup = "team.github.upbound.io" + CRDGroup = "team.template.upbound.io" CRDVersion = "v1alpha1" ) diff --git a/apis/team/v1alpha1/zz_team_types.go b/apis/team/v1alpha1/zz_team_types.go index 4d2c384..a6622a4 100755 --- a/apis/team/v1alpha1/zz_team_types.go +++ b/apis/team/v1alpha1/zz_team_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,17 +17,59 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type TeamInitParameters struct { + + // Adds a default maintainer to the team. Defaults to false and adds the creating user to the team when true. + CreateDefaultMaintainer *bool `json:"createDefaultMaintainer,omitempty" tf:"create_default_maintainer,omitempty"` + + // A description of the team. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + + // The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server. + LdapDn *string `json:"ldapDn,omitempty" tf:"ldap_dn,omitempty"` + + // The name of the team. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + + // The ID of the parent team, if this is a nested team. + ParentTeamID *float64 `json:"parentTeamId,omitempty" tf:"parent_team_id,omitempty"` + + // The level of privacy for the team. Must be one of secret or closed. + // Defaults to secret. + Privacy *string `json:"privacy,omitempty" tf:"privacy,omitempty"` +} + type TeamObservation struct { + + // Adds a default maintainer to the team. Defaults to false and adds the creating user to the team when true. + CreateDefaultMaintainer *bool `json:"createDefaultMaintainer,omitempty" tf:"create_default_maintainer,omitempty"` + + // A description of the team. + Description *string `json:"description,omitempty" tf:"description,omitempty"` + Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` // The ID of the created team. ID *string `json:"id,omitempty" tf:"id,omitempty"` + // The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise Server. + LdapDn *string `json:"ldapDn,omitempty" tf:"ldap_dn,omitempty"` + MembersCount *float64 `json:"membersCount,omitempty" tf:"members_count,omitempty"` + // The name of the team. + Name *string `json:"name,omitempty" tf:"name,omitempty"` + // The Node ID of the created team. NodeID *string `json:"nodeId,omitempty" tf:"node_id,omitempty"` + // The ID of the parent team, if this is a nested team. + ParentTeamID *float64 `json:"parentTeamId,omitempty" tf:"parent_team_id,omitempty"` + + // The level of privacy for the team. Must be one of secret or closed. + // Defaults to secret. + Privacy *string `json:"privacy,omitempty" tf:"privacy,omitempty"` + // The slug of the created team, which may or may not differ from name, // depending on whether name contains "URL-unsafe" characters. // Useful when referencing the team in github_branch_protection. @@ -45,8 +91,8 @@ type TeamParameters struct { LdapDn *string `json:"ldapDn,omitempty" tf:"ldap_dn,omitempty"` // The name of the team. - // +kubebuilder:validation:Required - Name *string `json:"name" tf:"name,omitempty"` + // +kubebuilder:validation:Optional + Name *string `json:"name,omitempty" tf:"name,omitempty"` // The ID of the parent team, if this is a nested team. // +kubebuilder:validation:Optional @@ -62,6 +108,17 @@ type TeamParameters struct { type TeamSpec struct { v1.ResourceSpec `json:",inline"` ForProvider TeamParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider TeamInitParameters `json:"initProvider,omitempty"` } // TeamStatus defines the observed state of Team. @@ -82,8 +139,9 @@ type TeamStatus struct { type Team struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - Spec TeamSpec `json:"spec"` - Status TeamStatus `json:"status,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + Spec TeamSpec `json:"spec"` + Status TeamStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/team/v1alpha1/zz_teamrepository_types.go b/apis/team/v1alpha1/zz_teamrepository_types.go index 3f094c2..7023e47 100755 --- a/apis/team/v1alpha1/zz_teamrepository_types.go +++ b/apis/team/v1alpha1/zz_teamrepository_types.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -13,10 +17,28 @@ import ( v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" ) +type TeamRepositoryInitParameters struct { + + // The permissions of team members regarding the repository. + // Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organisation. Defaults to pull. + Permission *string `json:"permission,omitempty" tf:"permission,omitempty"` +} + type TeamRepositoryObservation struct { Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // The permissions of team members regarding the repository. + // Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organisation. Defaults to pull. + Permission *string `json:"permission,omitempty" tf:"permission,omitempty"` + + // The repository to add to the team. + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + + // The GitHub team id or the GitHub team slug + // ID or slug of team + TeamID *string `json:"teamId,omitempty" tf:"team_id,omitempty"` } type TeamRepositoryParameters struct { @@ -58,6 +80,17 @@ type TeamRepositoryParameters struct { type TeamRepositorySpec struct { v1.ResourceSpec `json:",inline"` ForProvider TeamRepositoryParameters `json:"forProvider"` + // THIS IS A BETA FIELD. It will be honored + // unless the Management Policies feature flag is disabled. + // InitProvider holds the same fields as ForProvider, with the exception + // of Identifier and other resource reference fields. The fields that are + // in InitProvider are merged into ForProvider when the resource is created. + // The same fields are also added to the terraform ignore_changes hook, to + // avoid updating them after creation. This is useful for fields that are + // required on creation, but we do not desire to update them after creation, + // for example because of an external controller is managing them, like an + // autoscaler. + InitProvider TeamRepositoryInitParameters `json:"initProvider,omitempty"` } // TeamRepositoryStatus defines the observed state of TeamRepository. diff --git a/apis/v1alpha1/zz_generated.deepcopy.go b/apis/v1alpha1/zz_generated.deepcopy.go index 9d284ba..86f2d29 100644 --- a/apis/v1alpha1/zz_generated.deepcopy.go +++ b/apis/v1alpha1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/v1beta1/zz_generated.deepcopy.go b/apis/v1beta1/zz_generated.deepcopy.go index ae71405..09df2c1 100644 --- a/apis/v1beta1/zz_generated.deepcopy.go +++ b/apis/v1beta1/zz_generated.deepcopy.go @@ -1,5 +1,4 @@ //go:build !ignore_autogenerated -// +build !ignore_autogenerated /* Copyright 2022 Upbound Inc. diff --git a/apis/zz_register.go b/apis/zz_register.go index 8f38dc3..7958f5e 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ diff --git a/cmd/generator/main.go b/cmd/generator/main.go index c359fc2..b6d1dc6 100644 --- a/cmd/generator/main.go +++ b/cmd/generator/main.go @@ -9,7 +9,7 @@ import ( "os" "path/filepath" - "github.com/upbound/upjet/pkg/pipeline" + "github.com/crossplane/upjet/pkg/pipeline" "github.com/coopnorge/provider-github/config" ) diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 3db1dbf..9e5becd 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -15,8 +15,8 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/terraform" "gopkg.in/alecthomas/kingpin.v2" kerrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/config/actionssecret/config.go b/config/actionssecret/config.go index 05b2b52..78855fa 100644 --- a/config/actionssecret/config.go +++ b/config/actionssecret/config.go @@ -1,6 +1,6 @@ package actionssecret -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_actions_secret resource. func Configure(p *config.Provider) { diff --git a/config/branch/config.go b/config/branch/config.go index 4d4b90b..375b047 100644 --- a/config/branch/config.go +++ b/config/branch/config.go @@ -1,6 +1,6 @@ package branch -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_branch resource. func Configure(p *config.Provider) { diff --git a/config/branchprotection/config.go b/config/branchprotection/config.go index 377d99a..218e3ab 100644 --- a/config/branchprotection/config.go +++ b/config/branchprotection/config.go @@ -1,6 +1,6 @@ package branchprotection -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_branch_protection resource func Configure(p *config.Provider) { diff --git a/config/defaultbranch/config.go b/config/defaultbranch/config.go index 69e92e6..a49a2d4 100644 --- a/config/defaultbranch/config.go +++ b/config/defaultbranch/config.go @@ -1,6 +1,6 @@ package defaultbranch -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_branch_default resource. func Configure(p *config.Provider) { diff --git a/config/deploykey/config.go b/config/deploykey/config.go index 30ce265..9b019b8 100644 --- a/config/deploykey/config.go +++ b/config/deploykey/config.go @@ -1,6 +1,6 @@ package deploykey -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_branch resource. func Configure(p *config.Provider) { diff --git a/config/external_name.go b/config/external_name.go index c6f2a05..7d50f95 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -4,7 +4,7 @@ Copyright 2022 Upbound Inc. package config -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // ExternalNameConfigs contains all external name configurations for this // provider. diff --git a/config/provider.go b/config/provider.go index 951156a..deae30f 100644 --- a/config/provider.go +++ b/config/provider.go @@ -18,7 +18,7 @@ import ( "github.com/coopnorge/provider-github/config/repositoryfile" "github.com/coopnorge/provider-github/config/team" "github.com/coopnorge/provider-github/config/teamrepository" - ujconfig "github.com/upbound/upjet/pkg/config" + ujconfig "github.com/crossplane/upjet/pkg/config" ) const ( @@ -35,7 +35,9 @@ var providerMetadata string // GetProvider returns provider configuration func GetProvider() *ujconfig.Provider { pc := ujconfig.NewProvider([]byte(providerSchema), resourcePrefix, modulePath, []byte(providerMetadata), + ujconfig.WithRootGroup("template.upbound.io"), ujconfig.WithIncludeList(ExternalNameConfigured()), + ujconfig.WithFeaturesPackage("internal/features"), ujconfig.WithDefaultResourceOptions( ExternalNameConfigurations(), )) diff --git a/config/pullrequest/config.go b/config/pullrequest/config.go index b9e3d1c..1c21d9e 100644 --- a/config/pullrequest/config.go +++ b/config/pullrequest/config.go @@ -1,6 +1,6 @@ package pullrequest -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_repository_pull_request resource. func Configure(p *config.Provider) { diff --git a/config/repository/config.go b/config/repository/config.go index d8cb093..398a614 100644 --- a/config/repository/config.go +++ b/config/repository/config.go @@ -1,6 +1,6 @@ package repository -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_repository resource. func Configure(p *config.Provider) { diff --git a/config/repositoryfile/config.go b/config/repositoryfile/config.go index fd84627..ddedd2a 100644 --- a/config/repositoryfile/config.go +++ b/config/repositoryfile/config.go @@ -1,6 +1,6 @@ package repositoryfile -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_branch resource. func Configure(p *config.Provider) { diff --git a/config/team/config.go b/config/team/config.go index 2c76159..b8179b1 100644 --- a/config/team/config.go +++ b/config/team/config.go @@ -1,6 +1,6 @@ package team -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_team resource func Configure(p *config.Provider) { diff --git a/config/teamrepository/config.go b/config/teamrepository/config.go index 1098690..9558359 100644 --- a/config/teamrepository/config.go +++ b/config/teamrepository/config.go @@ -1,6 +1,6 @@ package teamrepository -import "github.com/upbound/upjet/pkg/config" +import "github.com/crossplane/upjet/pkg/config" // Configure github_team_repository resource func Configure(p *config.Provider) { diff --git a/examples-generated/actions/actionssecret.yaml b/examples-generated/actions/actionssecret.yaml index 9fea710..eae6191 100644 --- a/examples-generated/actions/actionssecret.yaml +++ b/examples-generated/actions/actionssecret.yaml @@ -1,4 +1,4 @@ -apiVersion: actions.github.upbound.io/v1alpha1 +apiVersion: actions.template.upbound.io/v1alpha1 kind: ActionsSecret metadata: annotations: @@ -16,6 +16,3 @@ spec: matchLabels: testing.upbound.io/example-name: example secretName: example_secret_name - ---- - diff --git a/examples-generated/repo/branch.yaml b/examples-generated/repo/branch.yaml index 5150324..eb27a86 100644 --- a/examples-generated/repo/branch.yaml +++ b/examples-generated/repo/branch.yaml @@ -1,4 +1,4 @@ -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: Branch metadata: annotations: @@ -11,6 +11,3 @@ spec: repositorySelector: matchLabels: testing.upbound.io/example-name: example - ---- - diff --git a/examples-generated/repo/branchprotection.yaml b/examples-generated/repo/branchprotection.yaml index df95b64..3cf3400 100644 --- a/examples-generated/repo/branchprotection.yaml +++ b/examples-generated/repo/branchprotection.yaml @@ -1,4 +1,4 @@ -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: BranchProtection metadata: annotations: @@ -33,7 +33,7 @@ spec: --- -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: Repository metadata: annotations: @@ -47,7 +47,7 @@ spec: --- -apiVersion: team.github.upbound.io/v1alpha1 +apiVersion: team.template.upbound.io/v1alpha1 kind: Team metadata: annotations: @@ -61,7 +61,7 @@ spec: --- -apiVersion: team.github.upbound.io/v1alpha1 +apiVersion: team.template.upbound.io/v1alpha1 kind: TeamRepository metadata: annotations: @@ -78,6 +78,3 @@ spec: teamIdSelector: matchLabels: testing.upbound.io/example-name: example - ---- - diff --git a/examples-generated/repo/defaultbranch.yaml b/examples-generated/repo/defaultbranch.yaml index 59d0d91..021f223 100644 --- a/examples-generated/repo/defaultbranch.yaml +++ b/examples-generated/repo/defaultbranch.yaml @@ -1,4 +1,4 @@ -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: DefaultBranch metadata: annotations: @@ -14,7 +14,7 @@ spec: --- -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: Branch metadata: annotations: @@ -30,7 +30,7 @@ spec: --- -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: Repository metadata: annotations: @@ -43,6 +43,3 @@ spec: autoInit: true description: My awesome codebase name: example - ---- - diff --git a/examples-generated/repo/deploykey.yaml b/examples-generated/repo/deploykey.yaml index cbfd58d..8741076 100644 --- a/examples-generated/repo/deploykey.yaml +++ b/examples-generated/repo/deploykey.yaml @@ -1,4 +1,4 @@ -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: DeployKey metadata: annotations: @@ -14,6 +14,3 @@ spec: matchLabels: testing.upbound.io/example-name: example title: Repository test key - ---- - diff --git a/examples-generated/repo/pullrequest.yaml b/examples-generated/repo/pullrequest.yaml index 73ee90e..4fe3fde 100644 --- a/examples-generated/repo/pullrequest.yaml +++ b/examples-generated/repo/pullrequest.yaml @@ -1,4 +1,4 @@ -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: PullRequest metadata: annotations: @@ -17,6 +17,3 @@ spec: matchLabels: testing.upbound.io/example-name: example title: My newest feature - ---- - diff --git a/examples-generated/repo/repository.yaml b/examples-generated/repo/repository.yaml index bc72a48..c3b832c 100644 --- a/examples-generated/repo/repository.yaml +++ b/examples-generated/repo/repository.yaml @@ -1,4 +1,4 @@ -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: Repository metadata: annotations: @@ -15,6 +15,3 @@ spec: owner: github repository: terraform-template-module visibility: public - ---- - diff --git a/examples-generated/repo/repositoryfile.yaml b/examples-generated/repo/repositoryfile.yaml index f5ca2f4..a76189e 100644 --- a/examples-generated/repo/repositoryfile.yaml +++ b/examples-generated/repo/repositoryfile.yaml @@ -1,4 +1,4 @@ -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: RepositoryFile metadata: annotations: @@ -23,7 +23,7 @@ spec: --- -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: Repository metadata: annotations: @@ -35,6 +35,3 @@ spec: forProvider: autoInit: true name: tf-acc-test-%s - ---- - diff --git a/examples-generated/team/team.yaml b/examples-generated/team/team.yaml index 9613187..5c24b0e 100644 --- a/examples-generated/team/team.yaml +++ b/examples-generated/team/team.yaml @@ -1,4 +1,4 @@ -apiVersion: team.github.upbound.io/v1alpha1 +apiVersion: team.template.upbound.io/v1alpha1 kind: Team metadata: annotations: @@ -11,6 +11,3 @@ spec: description: Some cool team name: some-team privacy: closed - ---- - diff --git a/examples-generated/team/teamrepository.yaml b/examples-generated/team/teamrepository.yaml index 331d7fb..7f51c42 100644 --- a/examples-generated/team/teamrepository.yaml +++ b/examples-generated/team/teamrepository.yaml @@ -1,4 +1,4 @@ -apiVersion: team.github.upbound.io/v1alpha1 +apiVersion: team.template.upbound.io/v1alpha1 kind: TeamRepository metadata: annotations: @@ -18,7 +18,7 @@ spec: --- -apiVersion: repo.github.upbound.io/v1alpha1 +apiVersion: repo.template.upbound.io/v1alpha1 kind: Repository metadata: annotations: @@ -32,7 +32,7 @@ spec: --- -apiVersion: team.github.upbound.io/v1alpha1 +apiVersion: team.template.upbound.io/v1alpha1 kind: Team metadata: annotations: @@ -44,6 +44,3 @@ spec: forProvider: description: Some cool team name: SomeTeam - ---- - diff --git a/go.mod b/go.mod index 3fe03f7..3699046 100644 --- a/go.mod +++ b/go.mod @@ -3,90 +3,71 @@ module github.com/coopnorge/provider-github go 1.20 require ( - github.com/crossplane/crossplane-runtime v0.19.0-rc.0.0.20221012013934-bce61005a175 + dario.cat/mergo v1.0.0 + github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5 github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e + github.com/crossplane/upjet v1.0.0 github.com/pkg/errors v0.9.1 - github.com/upbound/upjet v0.8.0-rc.0.0.20221024111721-c82119f5ef34 gopkg.in/alecthomas/kingpin.v2 v2.2.6 - k8s.io/apimachinery v0.25.0 - k8s.io/client-go v0.25.0 - sigs.k8s.io/controller-runtime v0.12.1 - sigs.k8s.io/controller-tools v0.8.0 + k8s.io/apimachinery v0.28.2 + k8s.io/client-go v0.28.2 + sigs.k8s.io/controller-runtime v0.16.2 + sigs.k8s.io/controller-tools v0.13.0 ) require ( - github.com/PuerkitoBio/purell v1.1.1 // indirect - github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect - github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect + github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/antchfx/htmlquery v1.2.4 // indirect github.com/antchfx/xpath v1.2.0 // indirect github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect - github.com/armon/go-metrics v0.3.9 // indirect - github.com/armon/go-radix v1.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v3 v3.0.0 // indirect - github.com/cespare/xxhash/v2 v2.1.2 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/dave/jennifer v1.4.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.8.0 // indirect - github.com/evanphx/json-patch v4.12.0+incompatible // indirect + github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/camelcase v1.0.0 // indirect - github.com/fatih/color v1.13.0 // indirect - github.com/fsnotify/fsnotify v1.5.4 // indirect - github.com/go-logr/logr v1.2.3 // indirect - github.com/go-logr/zapr v1.2.3 // indirect - github.com/go-openapi/jsonpointer v0.19.5 // indirect - github.com/go-openapi/jsonreference v0.19.5 // indirect - github.com/go-openapi/swag v0.19.14 // indirect - github.com/gobuffalo/flect v0.2.3 // indirect + github.com/fatih/color v1.15.0 // indirect + github.com/fsnotify/fsnotify v1.6.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect + github.com/go-logr/zapr v1.2.4 // indirect + github.com/go-openapi/jsonpointer v0.19.6 // indirect + github.com/go-openapi/jsonreference v0.20.2 // indirect + github.com/go-openapi/swag v0.22.3 // indirect + github.com/gobuffalo/flect v1.0.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/gnostic v0.5.7-v3refs // indirect - github.com/google/go-cmp v0.5.9 // indirect - github.com/google/gofuzz v1.1.0 // indirect - github.com/google/uuid v1.1.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/gnostic-models v0.6.8 // indirect + github.com/google/go-cmp v0.6.0 // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect github.com/hashicorp/go-hclog v1.2.1 // indirect - github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.4 // indirect - github.com/hashicorp/go-retryablehttp v0.6.6 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1 // indirect - github.com/hashicorp/go-secure-stdlib/strutil v0.1.1 // indirect - github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/golang-lru v0.5.4 // indirect - github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl/v2 v2.14.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect github.com/hashicorp/terraform-json v0.14.0 // indirect github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 // indirect - github.com/hashicorp/vault/api v1.3.1 // indirect - github.com/hashicorp/vault/sdk v0.3.0 // indirect - github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/iancoleman/strcase v0.2.0 // indirect - github.com/imdario/mergo v0.3.12 // indirect - github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/imdario/mergo v0.3.16 // 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 - github.com/mailru/easyjson v0.7.6 // indirect - github.com/mattn/go-colorable v0.1.12 // indirect - github.com/mattn/go-isatty v0.0.14 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/mattn/go-colorable v0.1.13 // indirect + github.com/mattn/go-isatty v0.0.17 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect + github.com/mitchellh/go-ps v1.0.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect @@ -95,15 +76,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 // indirect - github.com/oklog/run v1.0.0 // indirect - github.com/pierrec/lz4 v2.5.2+incompatible // indirect - github.com/prometheus/client_golang v1.12.2 // indirect - github.com/prometheus/client_model v0.2.0 // indirect - github.com/prometheus/common v0.32.1 // indirect - github.com/prometheus/procfs v0.7.3 // indirect - github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/spf13/afero v1.8.0 // indirect - github.com/spf13/cobra v1.4.0 // indirect + github.com/prometheus/client_golang v1.16.0 // indirect + github.com/prometheus/client_model v0.4.0 // indirect + github.com/prometheus/common v0.44.0 // indirect + github.com/prometheus/procfs v0.10.1 // indirect + github.com/spf13/afero v1.10.0 // indirect + github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/tmccombs/hcl2json v0.3.3 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect @@ -111,34 +89,33 @@ require ( github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/yuin/goldmark v1.4.13 // indirect github.com/zclconf/go-cty v1.11.0 // indirect - go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.7.0 // indirect - go.uber.org/zap v1.19.1 // indirect - golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/net v0.7.0 // indirect - golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect - golang.org/x/sys v0.5.0 // indirect - golang.org/x/term v0.5.0 // indirect - golang.org/x/text v0.7.0 // indirect - golang.org/x/time v0.0.0-20220609170525-579cf78fd858 // indirect - golang.org/x/tools v0.1.12 // indirect - gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect + github.com/zclconf/go-cty-yaml v1.0.3 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.26.0 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect + golang.org/x/mod v0.12.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/oauth2 v0.10.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/term v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect + golang.org/x/time v0.3.0 // indirect + golang.org/x/tools v0.13.0 // indirect + gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 // indirect - google.golang.org/grpc v1.48.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect + google.golang.org/grpc v1.58.3 // indirect + google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/square/go-jose.v2 v2.5.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.25.0 // indirect - k8s.io/apiextensions-apiserver v0.24.0 // indirect - k8s.io/component-base v0.25.0 // indirect - k8s.io/klog/v2 v2.70.1 // indirect - k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 // indirect - k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed // indirect - sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect + k8s.io/api v0.28.2 // indirect + k8s.io/apiextensions-apiserver v0.28.2 // indirect + k8s.io/component-base v0.28.2 // indirect + k8s.io/klog/v2 v2.100.1 // indirect + k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect + k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect + sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect sigs.k8s.io/yaml v1.3.0 // indirect ) diff --git a/go.sum b/go.sum index bd1b84e..4b24358 100644 --- a/go.sum +++ b/go.sum @@ -17,9 +17,6 @@ cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHOb cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -28,7 +25,6 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -39,203 +35,96 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= +dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/alecthomas/kong v0.2.16/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a h1:E/8AP5dFtMhl5KPJz66Kt9G0n+7Sn41Fy1wv9/jHOrc= -github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/antchfx/htmlquery v1.2.4 h1:qLteofCMe/KGovBI6SQgmou2QNyedFUW+pE+BpeZ494= github.com/antchfx/htmlquery v1.2.4/go.mod h1:2xO6iu3EVWs7R2JYqBbp8YzG50gj/ofqs5/0VZoDZLc= github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8= github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/antlr/antlr4/runtime/Go/antlr v0.0.0-20210826220005-b48c857c3a0e/go.mod h1:F7bn7fEU90QkQ3tnmaTx3LTKLEDqnwWODIYppRQ5hnY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= -github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= -github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= -github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane/crossplane-runtime v0.19.0-rc.0.0.20221012013934-bce61005a175 h1:qGLew6IazCwfgvY4/xh5lQiumip/WrULpQfW4duol6g= -github.com/crossplane/crossplane-runtime v0.19.0-rc.0.0.20221012013934-bce61005a175/go.mod h1:o9ExoilV6k2M3qzSFoRVX4phuww0mLmjs1WrDTvsR4s= +github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5 h1:K1Km6NCu9+VlZB3CmWSjrs09cDSbwQxJd2Qw2002dFs= +github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5/go.mod h1:kCS5576be8g++HhiDGEBUw+8nkW8p4jhURYeC0zx8jM= github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e h1:HqLaMji3FRPwEBA5P6twPz0HbE6no0XOnByLU5O1noM= github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e/go.mod h1:xFf30hwHd5n0/a0D4ZomId8nxQTTjE0Hc1j4/rWxefc= +github.com/crossplane/upjet v1.0.0 h1:/R509m+c5XTLsd9oXTEaLj2yIbM/EUmG34XOou1dugM= +github.com/crossplane/upjet v1.0.0/go.mod h1:t9etxIdYaxgyvFPBToikm5zBHi8RIpX8N4mTH77lQFM= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= 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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= -github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= +github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/evanphx/json-patch v0.5.2/go.mod h1:ZWS5hhDbVDyob71nXKNL0+PWn6ToqBHMikGIFbs31qQ= -github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH5pOlLGNtQ5lPWQu84= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch/v5 v5.5.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= +github.com/evanphx/json-patch v5.6.0+incompatible h1:jBYDEEiFBPxA0v50tFdvOzQQTCvpL6mnFh5mB2/l16U= +github.com/evanphx/json-patch/v5 v5.6.0 h1:b91NhWfaz02IuVxO9faSllyAtNXHMPkC5J8sJCLunww= +github.com/evanphx/json-patch/v5 v5.6.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2VvlbKOFpnXhI9Bw4= github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= -github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk= -github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-asn1-ber/asn1-ber v1.3.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-ldap/ldap/v3 v3.1.10/go.mod h1:5Zun81jBTabRaI8lzN7E1JjyEl1g6zI6u9pd8luAK4Q= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= -github.com/go-logr/zapr v1.2.3 h1:a9vnzlIBPQBBkeaR9IuMUfmVOrQlkoC4YfPoFkX3T7A= -github.com/go-logr/zapr v1.2.3/go.mod h1:eIauM6P8qSvTw5o2ez6UEAfGjQKrxQTl5EoK+Qa2oG4= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/zapr v1.2.4 h1:QHVo+6stLbfJmYGkQ7uGHUCu5hnAFAj6mDe6Ea0SeOo= +github.com/go-logr/zapr v1.2.4/go.mod h1:FyHWQIzQORZ0QVE1BtVHv3cKtNLuXsbNLtpuhNapBOA= +github.com/go-openapi/jsonpointer v0.19.6 h1:eCs3fxoIi3Wh6vtgmLTOjdhSpiqphQ+DaPn38N2ZdrE= +github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= +github.com/go-openapi/jsonreference v0.20.2 h1:3sVjiK66+uXK/6oQ8xgcRKcFgQ5KXa2KvnJRumpMGbE= +github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En5Ap4rVB5KVcIDZG2k= +github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g= +github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= +github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.7 h1:/VSMRlnY/JSyqxQUzQLKVMAskpY/NZKFA5j2P+0pP2M= github.com/go-test/deep v1.0.7/go.mod h1:QV8Hv/iy04NyLBxAdO9njL0iVPN1S4d/A3NVv1V36o8= -github.com/gobuffalo/flect v0.2.3 h1:f/ZukRnSNA/DUpSNDadko7Qc0PhGvsew35p/2tu+CRY= -github.com/gobuffalo/flect v0.2.3/go.mod h1:vmkQwuZYhN5Pc4ljYQZzP+1sq+NEkK+lh20jmEmX3jc= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gobuffalo/flect v1.0.2 h1:eqjPGSo2WmjgY2XlpGwo2NXgL3RucAKo4k4qQMNA5sA= +github.com/gobuffalo/flect v1.0.2/go.mod h1:A5msMlrHtLqh9umBSnvabjsMrCcCpAyzglnDvkbYKHs= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -248,7 +137,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -267,19 +155,13 @@ github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QD github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= -github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/addlicense v0.0.0-20210428195630-6d92264d7170/go.mod h1:EMjYTRimagHs1FwlIqKyX3wAM0u3rA+McvlIIWmSamA= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= -github.com/google/cel-go v0.10.1/go.mod h1:U7ayypeSkw23szu4GaQTPJGx66c20mx8JklMSxrmI1w= -github.com/google/cel-spec v0.6.0/go.mod h1:Nwjgxy5CbjlPrtCWjeDjUyKMl8w41YBYGjsyDdqk0xA= -github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= -github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= +github.com/google/gnostic-models v0.6.8 h1:yo/ABAfM5IMRsS1VnXjTBvUb61tFIHozhlYvRgGre9I= +github.com/google/gnostic-models v0.6.8/go.mod h1:5n7qKqH0f5wFt+aWF8CW6pZLLNOfYuF5OpfBSENuI8U= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -288,16 +170,14 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= +github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -311,93 +191,35 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= -github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= -github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ= -github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-retryablehttp v0.6.6 h1:HJunrbHTDDbBb/ay4kxa1n+dLmttUlnP3V9oNE4hmsM= -github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-secure-stdlib/base62 v0.1.1/go.mod h1:EdWO6czbmthiwZ3/PUsDV+UD1D5IRU4ActiaWGwt0Yw= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1 h1:cCRo8gK7oq6A2L6LICkUZ+/a5rLiRXFMf1Qd4xSwxTc= -github.com/hashicorp/go-secure-stdlib/mlock v0.1.1/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1 h1:78ki3QBevHwYrVxnyVeaEz+7WtifHhauYF23es/0KlI= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.1/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= -github.com/hashicorp/go-secure-stdlib/password v0.1.1/go.mod h1:9hH302QllNwu1o2TGYtSk8I8kTAN0ca1EHpwhm5Mmzo= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1 h1:nd0HIW15E6FG1MsnArYaHfuw9C2zgzM8LxkG5Ty/788= -github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= -github.com/hashicorp/go-secure-stdlib/tlsutil v0.1.1/go.mod h1:l8slYwnJA26yBz+ErHpp2IRCLr0vuOMGBORIz4rRiAs= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/hcl/v2 v2.9.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4= @@ -406,54 +228,27 @@ github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 h1:FtCLTiTcykdsURXPt/ku7fYXm3y19nbzbZcUxHx9RbI= github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0/go.mod h1:80wf5oad1tW+oLnbXS4UTYmDCrl7BuN1Q+IA91X1a4Y= -github.com/hashicorp/vault/api v1.3.1 h1:pkDkcgTh47PRjY1NEFeofqR4W/HkNUi9qIakESO2aRM= -github.com/hashicorp/vault/api v1.3.1/go.mod h1:QeJoWxMFt+MsuWcYhmwRLwKEXrjwAFFywzhptMsTIUw= -github.com/hashicorp/vault/sdk v0.3.0 h1:kR3dpxNkhh/wr6ycaJYqp6AFT/i2xaftbfnwZduTKEY= -github.com/hashicorp/vault/sdk v0.3.0/go.mod h1:aZ3fNuL5VNydQk8GcLJ2TV8YCRVvyaakYkhZRoVuhj0= -github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= +github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= +github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= -github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -461,194 +256,89 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= +github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= +github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 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/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 h1:CxRHKnh1YJXgNKxcos9rrKL6AcmOl1AS/fygmxFDzh4= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7/go.mod h1:SAAdeMEiFXR8LcHffvIdiLI1w243DCH2DuHq7UrA5YQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= -github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo/v2 v2.1.4 h1:GNapqRSid3zijZ9H77KrgVG4/8KqiyRsxcSxe+7ApXY= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.19.0 h1:4ieX6qQjPP/BfC3mpsAtIGGlxTWPeA3Inl/7DtXw1tw= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI= -github.com/pierrec/lz4 v2.5.2+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= +github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= +github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= +github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= +github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkBk= -github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60= -github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/cobra v1.4.0 h1:y+wJpx64xcgO1V+RcnwW0LEHxTKRi2ZDPSBjWnrg88Q= -github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= +github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= +github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= +github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/upbound/upjet v0.8.0-rc.0.0.20221024111721-c82119f5ef34 h1:TXehSax5YEurPY8vMnRx7n8xIHENGAiOhISxxqthcX0= -github.com/upbound/upjet v0.8.0-rc.0.0.20221024111721-c82119f5ef34/go.mod h1:QyDjh8h49niORvHLHZE8ZS4fiCa6Dkcsw3aBJBfK3I8= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= @@ -656,13 +346,11 @@ github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvC github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= @@ -672,70 +360,31 @@ github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uU github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/client/v3 v3.5.1/go.mod h1:OnjH4M8OnAotwaB2l9bVgZzRFKru7/ZMoS46OtKyd3Q= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= +github.com/zclconf/go-cty-yaml v1.0.3 h1:og/eOQ7lvA/WWhHGFETVWNduJM7Rjsv2RRpx1sdFMLc= +github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= -go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= -go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= -go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= -go.uber.org/zap v1.19.1 h1:ue41HOKd1vGURxrmeKIgELGb3jPW9DMUDGtsinblHwI= -go.uber.org/zap v1.19.1/go.mod h1:j3DNczoxDZroyBnOT1L/Q79cfUMGZxlv/9dzN7SM1rI= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 h1:O8uGbHCqlTp2P6QJSLmCojM4mN6UemYv8K+dCnmHmu0= -golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -746,6 +395,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -759,7 +410,6 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -771,18 +421,11 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -790,11 +433,9 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -806,28 +447,19 @@ golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -837,11 +469,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= -golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= +golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -853,33 +482,20 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -892,47 +508,30 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -942,37 +541,28 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858 h1:Dpdu/EMxGMFgq0CeYMh4fazTD2vtlZRYE7wyynxJb9U= -golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -992,7 +582,6 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1009,17 +598,15 @@ golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.10-0.20220218145154-897bd77cd717/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gomodules.xyz/jsonpatch/v2 v2.2.0 h1:4pT439QV83L+G9FkcCriY6EkpcK6r6bK+A5FBUMI7qY= -gomodules.xyz/jsonpatch/v2 v2.2.0/go.mod h1:WXp+iVDkoLQqPudfQ9GBlwB2eZ5DKOnjQZCYdOS8GPY= +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/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1039,8 +626,6 @@ google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz513 google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1049,7 +634,6 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20170818010345-ee236bd376b0/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1071,10 +655,8 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= @@ -1082,25 +664,14 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201102152239-715cce707fb0/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20220107163113-42d7afdf6368/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21 h1:hrbNEivu7Zn1pxvHk6MBrq9iE22woVILTHqexqBxe6I= -google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -1114,19 +685,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w= -google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= +google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1139,46 +702,25 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= +google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/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= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/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= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1186,51 +728,32 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.24.0/go.mod h1:5Jl90IUrJHUJYEMANRURMiVvJ0g7Ax7r3R1bqO8zx8I= -k8s.io/api v0.25.0 h1:H+Q4ma2U/ww0iGB78ijZx6DRByPz6/733jIuFpX70e0= -k8s.io/api v0.25.0/go.mod h1:ttceV1GyV1i1rnmvzT3BST08N6nGt+dudGrquzVQWPk= -k8s.io/apiextensions-apiserver v0.24.0 h1:JfgFqbA8gKJ/uDT++feAqk9jBIwNnL9YGdQvaI9DLtY= -k8s.io/apiextensions-apiserver v0.24.0/go.mod h1:iuVe4aEpe6827lvO6yWQVxiPSpPoSKVjkq+MIdg84cM= -k8s.io/apimachinery v0.24.0/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= -k8s.io/apimachinery v0.25.0 h1:MlP0r6+3XbkUG2itd6vp3oxbtdQLQI94fD5gCS+gnoU= -k8s.io/apimachinery v0.25.0/go.mod h1:qMx9eAk0sZQGsXGu86fab8tZdffHbwUfsvzqKn4mfB0= -k8s.io/apiserver v0.24.0/go.mod h1:WFx2yiOMawnogNToVvUYT9nn1jaIkMKj41ZYCVycsBA= -k8s.io/client-go v0.24.0/go.mod h1:VFPQET+cAFpYxh6Bq6f4xyMY80G6jKKktU6G0m00VDw= -k8s.io/client-go v0.25.0 h1:CVWIaCETLMBNiTUta3d5nzRbXvY5Hy9Dpl+VvREpu5E= -k8s.io/client-go v0.25.0/go.mod h1:lxykvypVfKilxhTklov0wz1FoaUZ8X4EwbhS6rpRfN8= -k8s.io/code-generator v0.24.0/go.mod h1:dpVhs00hTuTdTY6jvVxvTFCk6gSMrtfRydbhZwHI15w= -k8s.io/component-base v0.24.0/go.mod h1:Dgazgon0i7KYUsS8krG8muGiMVtUZxG037l1MKyXgrA= -k8s.io/component-base v0.25.0 h1:haVKlLkPCFZhkcqB6WCvpVxftrg6+FK5x1ZuaIDaQ5Y= -k8s.io/component-base v0.25.0/go.mod h1:F2Sumv9CnbBlqrpdf7rKZTmmd2meJq0HizeyY/yAFxk= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20211129171323-c02415ce4185/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ= -k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= -k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1/go.mod h1:C/N6wCaBHeBHkHUesQOQy2/MZqGgMAFPqGsGQLdbZBU= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= -k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= +k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= +k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= +k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= +k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= +k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= +k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= +k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= +k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= +k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= +k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= +k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9/go.mod h1:wZK2AVp1uHCp4VamDVgBP2COHZjqD1T68Rf0CM3YjSM= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b h1:sgn3ZU783SCgtaSJjpcVVlRqd6GSnlTLKgpAAttJvpI= +k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.30/go.mod h1:fEO7lRTdivWO2qYVCVG7dEADOMo/MLDCVr8So2g88Uw= -sigs.k8s.io/controller-runtime v0.12.1 h1:4BJY01xe9zKQti8oRjj/NeHKRXthf1YkYJAgLONFFoI= -sigs.k8s.io/controller-runtime v0.12.1/go.mod h1:BKhxlA4l7FPK4AQcsuL4X6vZeWnKDXez/vp1Y8dxTU0= -sigs.k8s.io/controller-tools v0.8.0 h1:uUkfTGEwrguqYYfcI2RRGUnC8mYdCFDqfwPKUcNJh1o= -sigs.k8s.io/controller-tools v0.8.0/go.mod h1:qE2DXhVOiEq5ijmINcFbqi9GZrrUjzB1TuJU0xa6eoY= -sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 h1:iXTIw73aPyC+oRdyqqvVJuloN1p0AC/kzH07hu3NE+k= -sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= +sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= +sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= +sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= +sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= sigs.k8s.io/structured-merge-diff/v4 v4.2.3 h1:PRbqxJClWWYMNV1dhaG4NsibJbArud9kFxnAMREiWFE= sigs.k8s.io/structured-merge-diff/v4 v4.2.3/go.mod h1:qjx8mGObPmV2aSZepjQjbmb2ihdVs8cGKBraizNC69E= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= diff --git a/internal/clients/github.go b/internal/clients/github.go index 76f7235..11af97e 100644 --- a/internal/clients/github.go +++ b/internal/clients/github.go @@ -13,7 +13,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/upbound/upjet/pkg/terraform" + "github.com/crossplane/upjet/pkg/terraform" "github.com/coopnorge/provider-github/apis/v1beta1" ) diff --git a/internal/controller/actions/actionssecret/zz_controller.go b/internal/controller/actions/actionssecret/zz_controller.go index ad3b68d..ec1797f 100755 --- a/internal/controller/actions/actionssecret/zz_controller.go +++ b/internal/controller/actions/actionssecret/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/actions/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles ActionsSecret managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.ActionsSecret_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_actions_secret"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ActionsSecret_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.ActionsSecret_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.ActionsSecret_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_actions_secret"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ActionsSecret_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.ActionsSecret{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.ActionsSecret{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/providerconfig/config.go b/internal/controller/providerconfig/config.go index 8820238..3d747e7 100644 --- a/internal/controller/providerconfig/config.go +++ b/internal/controller/providerconfig/config.go @@ -11,7 +11,7 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/event" "github.com/crossplane/crossplane-runtime/pkg/reconciler/providerconfig" "github.com/crossplane/crossplane-runtime/pkg/resource" - "github.com/upbound/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller" "github.com/coopnorge/provider-github/apis/v1beta1" ) diff --git a/internal/controller/repo/branch/zz_controller.go b/internal/controller/repo/branch/zz_controller.go index 911c7a4..ef73e99 100755 --- a/internal/controller/repo/branch/zz_controller.go +++ b/internal/controller/repo/branch/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles Branch managed resources. @@ -28,25 +34,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.Branch_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_branch"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Branch_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Branch_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Branch_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_branch"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Branch_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Branch{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Branch{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/repo/branchprotection/zz_controller.go b/internal/controller/repo/branchprotection/zz_controller.go index c58c032..88aea23 100755 --- a/internal/controller/repo/branchprotection/zz_controller.go +++ b/internal/controller/repo/branchprotection/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles BranchProtection managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.BranchProtection_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_branch_protection"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.BranchProtection_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.BranchProtection_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.BranchProtection_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_branch_protection"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.BranchProtection_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.BranchProtection{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.BranchProtection{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/repo/defaultbranch/zz_controller.go b/internal/controller/repo/defaultbranch/zz_controller.go index b10d433..ab0349b 100755 --- a/internal/controller/repo/defaultbranch/zz_controller.go +++ b/internal/controller/repo/defaultbranch/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles DefaultBranch managed resources. @@ -28,25 +34,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { initializers = append(initializers, managed.NewNameAsExternalName(mgr.GetClient())) cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.DefaultBranch_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_branch_default"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DefaultBranch_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.DefaultBranch_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DefaultBranch_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_branch_default"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DefaultBranch_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.DefaultBranch{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.DefaultBranch{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/repo/deploykey/zz_controller.go b/internal/controller/repo/deploykey/zz_controller.go index 2f8d30c..ba1e076 100755 --- a/internal/controller/repo/deploykey/zz_controller.go +++ b/internal/controller/repo/deploykey/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles DeployKey managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.DeployKey_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository_deploy_key"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DeployKey_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.DeployKey_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.DeployKey_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository_deploy_key"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DeployKey_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.DeployKey{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.DeployKey{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/repo/pullrequest/zz_controller.go b/internal/controller/repo/pullrequest/zz_controller.go index 44f5a21..cf72b7d 100755 --- a/internal/controller/repo/pullrequest/zz_controller.go +++ b/internal/controller/repo/pullrequest/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles PullRequest managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.PullRequest_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository_pull_request"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.PullRequest_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.PullRequest_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.PullRequest_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository_pull_request"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.PullRequest_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.PullRequest{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.PullRequest{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/repo/repository/zz_controller.go b/internal/controller/repo/repository/zz_controller.go index 28c1033..fe0ab37 100755 --- a/internal/controller/repo/repository/zz_controller.go +++ b/internal/controller/repo/repository/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles Repository managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.Repository_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Repository_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Repository_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Repository_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Repository_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Repository{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Repository{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/repo/repositoryfile/zz_controller.go b/internal/controller/repo/repositoryfile/zz_controller.go index a078f6c..5480635 100755 --- a/internal/controller/repo/repositoryfile/zz_controller.go +++ b/internal/controller/repo/repositoryfile/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles RepositoryFile managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.RepositoryFile_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository_file"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.RepositoryFile_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.RepositoryFile_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.RepositoryFile_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_repository_file"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.RepositoryFile_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.RepositoryFile{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.RepositoryFile{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/team/team/zz_controller.go b/internal/controller/team/team/zz_controller.go index 98404c5..dfd4831 100755 --- a/internal/controller/team/team/zz_controller.go +++ b/internal/controller/team/team/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/team/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles Team managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_team"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.Team_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_team"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.Team{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.Team{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/team/teamrepository/zz_controller.go b/internal/controller/team/teamrepository/zz_controller.go index 3fb7cc5..338638b 100755 --- a/internal/controller/team/teamrepository/zz_controller.go +++ b/internal/controller/team/teamrepository/zz_controller.go @@ -1,3 +1,7 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + /* Copyright 2022 Upbound Inc. */ @@ -14,11 +18,13 @@ import ( "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" - tjcontroller "github.com/upbound/upjet/pkg/controller" - "github.com/upbound/upjet/pkg/terraform" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/terraform" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/team/v1alpha1" + features "github.com/coopnorge/provider-github/internal/features" ) // Setup adds a controller that reconciles TeamRepository managed resources. @@ -27,25 +33,34 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { var initializers managed.InitializerChain cps := []managed.ConnectionPublisher{managed.NewAPISecretPublisher(mgr.GetClient(), mgr.GetScheme())} if o.SecretStoreConfigGVK != nil { - cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK)) + cps = append(cps, connection.NewDetailsManager(mgr.GetClient(), *o.SecretStoreConfigGVK, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) } - r := managed.NewReconciler(mgr, - xpresource.ManagedKind(v1alpha1.TeamRepository_GroupVersionKind), - managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_team_repository"], - tjcontroller.WithCallbackProvider(tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.TeamRepository_GroupVersionKind))), + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.TeamRepository_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.TeamRepository_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter(tjcontroller.NewConnector(mgr.GetClient(), o.WorkspaceStore, o.SetupFn, o.Provider.Resources["github_team_repository"], tjcontroller.WithLogger(o.Logger), tjcontroller.WithConnectorEventHandler(eventHandler), + tjcontroller.WithCallbackProvider(ac), )), managed.WithLogger(o.Logger.WithValues("controller", name)), managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), managed.WithFinalizer(terraform.NewWorkspaceFinalizer(o.WorkspaceStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), - managed.WithTimeout(3*time.Minute), + managed.WithTimeout(3 * time.Minute), managed.WithInitializers(initializers), managed.WithConnectionPublishers(cps...), managed.WithPollInterval(o.PollInterval), - ) + } + if o.PollJitter != 0 { + opts = append(opts, managed.WithPollJitterHook(o.PollJitter)) + } + if o.Features.Enabled(features.EnableBetaManagementPolicies) { + opts = append(opts, managed.WithManagementPolicies()) + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.TeamRepository_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). Named(name). WithOptions(o.ForControllerRuntime()). - For(&v1alpha1.TeamRepository{}). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.TeamRepository{}, eventHandler). Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) } diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 779b891..9aa22ed 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -1,13 +1,13 @@ -/* -Copyright 2021 Upbound Inc. -*/ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 package controller import ( ctrl "sigs.k8s.io/controller-runtime" - "github.com/upbound/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller" actionssecret "github.com/coopnorge/provider-github/internal/controller/actions/actionssecret" providerconfig "github.com/coopnorge/provider-github/internal/controller/providerconfig" diff --git a/package/crds/actions.github.upbound.io_actionssecrets.yaml b/package/crds/actions.template.upbound.io_actionssecrets.yaml similarity index 81% rename from package/crds/actions.github.upbound.io_actionssecrets.yaml rename to package/crds/actions.template.upbound.io_actionssecrets.yaml index 4ef713b..b409461 100644 --- a/package/crds/actions.github.upbound.io_actionssecrets.yaml +++ b/package/crds/actions.template.upbound.io_actionssecrets.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: actionssecrets.actions.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: actionssecrets.actions.template.upbound.io spec: - group: actions.github.upbound.io + group: actions.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -178,9 +181,48 @@ spec: secretName: description: Name of the secret type: string - required: - - secretName type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + secretName: + description: Name of the secret + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -219,42 +261,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -352,6 +358,11 @@ spec: required: - forProvider type: object + x-kubernetes-validations: + - message: spec.forProvider.secretName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.secretName) + || (has(self.initProvider) && has(self.initProvider.secretName))' status: description: ActionsSecretStatus defines the observed state of ActionsSecret. properties: @@ -362,6 +373,12 @@ spec: type: string id: type: string + repository: + description: Name of the repository + type: string + secretName: + description: Name of the secret + type: string updatedAt: description: Date of actions_secret update. type: string @@ -399,6 +416,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -407,9 +427,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/github.upbound.io_providerconfigs.yaml b/package/crds/github.upbound.io_providerconfigs.yaml index ce6b296..f698e8c 100644 --- a/package/crds/github.upbound.io_providerconfigs.yaml +++ b/package/crds/github.upbound.io_providerconfigs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: providerconfigs.github.upbound.io spec: group: github.upbound.io @@ -139,6 +138,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map users: description: Users of this provider configuration. format: int64 @@ -151,9 +153,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/github.upbound.io_providerconfigusages.yaml b/package/crds/github.upbound.io_providerconfigusages.yaml index ceee4cb..02d9a2f 100644 --- a/package/crds/github.upbound.io_providerconfigusages.yaml +++ b/package/crds/github.upbound.io_providerconfigusages.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: providerconfigusages.github.upbound.io spec: group: github.upbound.io @@ -109,9 +108,3 @@ spec: served: true storage: true subresources: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/github.upbound.io_storeconfigs.yaml b/package/crds/github.upbound.io_storeconfigs.yaml index 243d1d5..1040f8a 100644 --- a/package/crds/github.upbound.io_storeconfigs.yaml +++ b/package/crds/github.upbound.io_storeconfigs.yaml @@ -3,8 +3,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null + controller-gen.kubebuilder.io/version: v0.13.0 name: storeconfigs.github.upbound.io spec: group: github.upbound.io @@ -120,149 +119,40 @@ spec: required: - auth type: object - type: - default: Kubernetes - description: Type configures which secret store to be used. Only the - configuration block for this store will be used and others will - be ignored if provided. Default is Kubernetes. - type: string - vault: - description: Vault configures a Vault secret store. + plugin: + description: Plugin configures External secret store as a plugin. properties: - auth: - description: Auth configures an authentication method for Vault. + configRef: + description: ConfigRef contains store config reference info. properties: - method: - description: Method configures which auth method will be used. + apiVersion: + description: APIVersion of the referenced config. type: string - token: - description: Token configures Token Auth for Vault. - properties: - env: - description: Env is a reference to an environment variable - that contains credentials that must be used to connect - to the provider. - properties: - name: - description: Name is the name of an environment variable. - type: string - required: - - name - type: object - fs: - description: Fs is a reference to a filesystem location - that contains credentials that must be used to connect - to the provider. - properties: - path: - description: Path is a filesystem path. - type: string - required: - - path - type: object - secretRef: - description: A SecretRef is a reference to a secret key - that contains the credentials that must be used to connect - to the provider. - properties: - key: - description: The key to select. - type: string - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - key - - name - - namespace - type: object - source: - description: Source of the credentials. - enum: - - None - - Secret - - Environment - - Filesystem - type: string - required: - - source - type: object - required: - - method - type: object - caBundle: - description: CABundle configures CA bundle for Vault Server. - properties: - env: - description: Env is a reference to an environment variable - that contains credentials that must be used to connect to - the provider. - properties: - name: - description: Name is the name of an environment variable. - type: string - required: - - name - type: object - fs: - description: Fs is a reference to a filesystem location that - contains credentials that must be used to connect to the - provider. - properties: - path: - description: Path is a filesystem path. - type: string - required: - - path - type: object - secretRef: - description: A SecretRef is a reference to a secret key that - contains the credentials that must be used to connect to - the provider. - properties: - key: - description: The key to select. - type: string - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - key - - name - - namespace - type: object - source: - description: Source of the credentials. - enum: - - None - - Secret - - Environment - - Filesystem + kind: + description: Kind of the referenced config. + type: string + name: + description: Name of the referenced config. type: string required: - - source + - apiVersion + - kind + - name type: object - mountPath: - description: MountPath is the mount path of the KV secrets engine. - type: string - server: - description: Server is the url of the Vault server, e.g. "https://vault.acme.org" + endpoint: + description: Endpoint is the endpoint of the gRPC server. type: string - version: - default: v2 - description: Version of the KV Secrets engine of Vault. https://www.vaultproject.io/docs/secrets/kv - type: string - required: - - auth - - mountPath - - server type: object + type: + default: Kubernetes + description: Type configures which secret store to be used. Only the + configuration block for this store will be used and others will + be ignored if provided. Default is Kubernetes. + enum: + - Kubernetes + - Vault + - Plugin + type: string required: - defaultScope type: object @@ -302,6 +192,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -310,9 +203,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/repo.github.upbound.io_repositories.yaml b/package/crds/repo.github.upbound.io_repositories.yaml deleted file mode 100644 index 3f0bbb1..0000000 --- a/package/crds/repo.github.upbound.io_repositories.yaml +++ /dev/null @@ -1,597 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: repositories.repo.github.upbound.io -spec: - group: repo.github.upbound.io - names: - categories: - - crossplane - - managed - - github - kind: Repository - listKind: RepositoryList - plural: repositories - singular: repository - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .status.conditions[?(@.type=='Ready')].status - name: READY - type: string - - jsonPath: .status.conditions[?(@.type=='Synced')].status - name: SYNCED - type: string - - jsonPath: .metadata.annotations.crossplane\.io/external-name - name: EXTERNAL-NAME - type: string - - jsonPath: .metadata.creationTimestamp - name: AGE - type: date - name: v1alpha1 - schema: - openAPIV3Schema: - description: Repository is the Schema for the Repositorys API. Creates and - manages repositories within GitHub organizations or personal accounts - properties: - apiVersion: - description: 'APIVersion defines the versioned schema of this representation - of an object. Servers should convert recognized schemas to the latest - internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' - type: string - kind: - description: 'Kind is a string value representing the REST resource this - object represents. Servers may infer this from the endpoint the client - submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - metadata: - type: object - spec: - description: RepositorySpec defines the desired state of Repository - properties: - deletionPolicy: - default: Delete - description: DeletionPolicy specifies what will happen to the underlying - external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. - enum: - - Orphan - - Delete - type: string - forProvider: - properties: - allowAutoMerge: - description: Set to true to allow auto-merging pull requests on - the repository. - type: boolean - allowMergeCommit: - description: Set to false to disable merge commits on the repository. - type: boolean - allowRebaseMerge: - description: Set to false to disable rebase merges on the repository. - type: boolean - allowSquashMerge: - description: Set to false to disable squash merges on the repository. - type: boolean - allowUpdateBranch: - description: Set to true to always suggest updating pull request - branches. - type: boolean - archiveOnDestroy: - description: Set to true to archive the repository instead of - deleting on destroy. - type: boolean - archived: - description: Specifies if the repository should be archived. Defaults - to false. NOTE Currently, the API does not support unarchiving. - type: boolean - autoInit: - description: Set to true to produce an initial commit in the repository. - type: boolean - defaultBranch: - description: '(Deprecated: Use github_branch_default resource - instead) The name of the default branch of the repository. NOTE: - This can only be set after a repository has already been created, - and after a correct reference has been created for the target - branch inside the repository. This means a user will have to - omit this parameter from the initial repository creation and - create the target branch inside of the repository prior to setting - this attribute. Can only be set after initial repository creation, - and only if the target branch exists' - type: string - deleteBranchOnMerge: - description: Automatically delete head branch after a pull request - is merged. Defaults to false. - type: boolean - description: - description: A description of the repository. - type: string - gitignoreTemplate: - description: Use the name of the template without the extension. - For example, "Haskell". - type: string - hasDiscussions: - description: Set to true to enable GitHub Discussions on the repository. - Defaults to false. - type: boolean - hasDownloads: - description: Set to true to enable the (deprecated) downloads - features on the repository. - type: boolean - hasIssues: - description: Set to true to enable the GitHub Issues features - on the repository. - type: boolean - hasProjects: - description: Set to true to enable the GitHub Projects features - on the repository. Per the GitHub documentation when in an organization - that has disabled repository projects it will default to false - and will otherwise default to true. If you specify true when - it has been disabled it will return an error. - type: boolean - hasWiki: - description: Set to true to enable the GitHub Wiki features on - the repository. - type: boolean - homepageUrl: - description: URL of a page describing the project. - type: string - ignoreVulnerabilityAlertsDuringRead: - description: Set to true to not call the vulnerability alerts - endpoint so the resource can also be used without admin permissions - during read. - type: boolean - isTemplate: - description: Set to true to tell GitHub that this is a template - repository. - type: boolean - licenseTemplate: - description: Use the name of the template without the extension. - For example, "mit" or "mpl-2.0". - type: string - mergeCommitMessage: - description: Can be PR_BODY, PR_TITLE, or BLANK for a default - merge commit message. - type: string - mergeCommitTitle: - description: Can be PR_TITLE or MERGE_MESSAGE for a default merge - commit title. - type: string - name: - description: The name of the repository. - type: string - pages: - description: The repository's GitHub Pages configuration. See - GitHub Pages Configuration below for details. - items: - properties: - cname: - description: The custom domain for the repository. This - can only be set after the repository has been created. - type: string - source: - description: The source branch and directory for the rendered - Pages site. See GitHub Pages Source below for details. - items: - properties: - branch: - description: The repository branch used to publish - the site's source files. (i.e. main or gh-pages. - type: string - path: - description: 'The repository directory from which - the site publishes (Default: /).' - type: string - required: - - branch - type: object - type: array - required: - - source - type: object - type: array - private: - description: Set to true to create a private repository. Repositories - are created as public (e.g. open source) by default. - type: boolean - securityAndAnalysis: - description: The repository's security and analysis configuration. - See Security and Analysis Configuration below for details. Security - and analysis settings for the repository. To use this parameter - you must have admin permissions for the repository or be an - owner or security manager for the organization that owns the - repository. - items: - properties: - advancedSecurity: - description: The advanced security configuration for the - repository. See Advanced Security Configuration below - for details. If a repository's visibility is public, advanced - security is always enabled and cannot be changed, so this - setting cannot be supplied. - items: - properties: - status: - description: Set to enabled to enable secret scanning - on the repository. Can be enabled or disabled. If - set to enabled, the repository's visibility must - be public or security_and_analysis[0].advanced_security[0].status - must also be set to enabled. - type: string - required: - - status - type: object - type: array - secretScanning: - description: The secret scanning configuration for the repository. - See Secret Scanning Configuration below for details. - items: - properties: - status: - description: Set to enabled to enable secret scanning - on the repository. Can be enabled or disabled. If - set to enabled, the repository's visibility must - be public or security_and_analysis[0].advanced_security[0].status - must also be set to enabled. - type: string - required: - - status - type: object - type: array - secretScanningPushProtection: - description: The secret scanning push protection configuration - for the repository. See Secret Scanning Push Protection - Configuration below for details. - items: - properties: - status: - description: Set to enabled to enable secret scanning - on the repository. Can be enabled or disabled. If - set to enabled, the repository's visibility must - be public or security_and_analysis[0].advanced_security[0].status - must also be set to enabled. - type: string - required: - - status - type: object - type: array - type: object - type: array - squashMergeCommitMessage: - description: Can be PR_BODY, COMMIT_MESSAGES, or BLANK for a default - squash merge commit message. - type: string - squashMergeCommitTitle: - description: Can be PR_TITLE or COMMIT_OR_PR_TITLE for a default - squash merge commit title. - type: string - template: - description: Use a template repository to create this resource. - See Template Repositories below for details. - items: - properties: - includeAllBranches: - description: ': Whether the new repository should include - all the branches from the template repository (defaults - to false, which includes only the default branch from - the template).' - type: boolean - owner: - description: ': The GitHub organization or user the template - repository is owned by.' - type: string - repository: - description: ': The name of the template repository.' - type: string - required: - - owner - - repository - type: object - type: array - topics: - description: The list of topics of the repository. - items: - type: string - type: array - visibility: - description: Can be public or private. If your organization is - associated with an enterprise account using GitHub Enterprise - Cloud or GitHub Enterprise Server 2.20+, visibility can also - be internal. The visibility parameter overrides the private - parameter. - type: string - vulnerabilityAlerts: - description: 'Set to true to enable security alerts for vulnerable - dependencies. Enabling requires alerts to be enabled on the - owner level. (Note for importing: GitHub enables the alerts - on public repos but disables them on private repos by default.) - See GitHub Documentation for details. Note that vulnerability - alerts have not been successfully tested on any GitHub Enterprise - instance and may be unavailable in those settings.' - type: boolean - required: - - name - type: object - providerConfigRef: - default: - name: default - description: ProviderConfigReference specifies how the provider that - will be used to create, observe, update, and delete this managed - resource should be configured. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - publishConnectionDetailsTo: - description: PublishConnectionDetailsTo specifies the connection secret - config which contains a name, metadata and a reference to secret - store config to which any connection details for this managed resource - should be written. Connection details frequently include the endpoint, - username, and password required to connect to the managed resource. - properties: - configRef: - default: - name: default - description: SecretStoreConfigRef specifies which secret store - config should be used for this ConnectionSecret. - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of - this reference is required. The default is 'Required', - which means the reconcile will fail if the reference - cannot be resolved. 'Optional' means this reference - will be a no-op if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will - attempt to resolve the reference only when the corresponding - field is not present. Use 'Always' to resolve the reference - on every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object - metadata: - description: Metadata is the metadata for connection secret. - properties: - annotations: - additionalProperties: - type: string - description: Annotations are the annotations to be added to - connection secret. - For Kubernetes secrets, this will be - used as "metadata.annotations". - It is up to Secret Store - implementation for others store types. - type: object - labels: - additionalProperties: - type: string - description: Labels are the labels/tags to be added to connection - secret. - For Kubernetes secrets, this will be used as "metadata.labels". - - It is up to Secret Store implementation for others store - types. - type: object - type: - description: Type is the SecretType for the connection secret. - - Only valid for Kubernetes Secret Stores. - type: string - type: object - name: - description: Name is the name of the connection secret. - type: string - required: - - name - type: object - writeConnectionSecretToRef: - description: WriteConnectionSecretToReference specifies the namespace - and name of a Secret to which any connection details for this managed - resource should be written. Connection details frequently include - the endpoint, username, and password required to connect to the - managed resource. This field is planned to be replaced in a future - release in favor of PublishConnectionDetailsTo. Currently, both - could be set independently and connection details would be published - to both without affecting each other. - properties: - name: - description: Name of the secret. - type: string - namespace: - description: Namespace of the secret. - type: string - required: - - name - - namespace - type: object - required: - - forProvider - type: object - status: - description: RepositoryStatus defines the observed state of Repository. - properties: - atProvider: - properties: - etag: - type: string - fullName: - description: A string of the form "orgname/reponame". - type: string - gitCloneUrl: - description: URL that can be provided to git clone to clone the - repository anonymously via the git protocol. - type: string - htmlUrl: - description: URL to the repository on the web. - type: string - httpCloneUrl: - description: URL that can be provided to git clone to clone the - repository via HTTPS. - type: string - id: - type: string - nodeId: - description: GraphQL global node id for use with v4 API - type: string - pages: - description: The repository's GitHub Pages configuration. See - GitHub Pages Configuration below for details. - items: - properties: - custom404: - description: Whether the rendered GitHub Pages site has - a custom 404 page. - type: boolean - htmlUrl: - description: URL to the repository on the web. - type: string - status: - description: Set to enabled to enable secret scanning on - the repository. Can be enabled or disabled. If set to - enabled, the repository's visibility must be public or - security_and_analysis[0].advanced_security[0].status must - also be set to enabled. - type: string - url: - type: string - type: object - type: array - repoId: - description: GitHub ID for the repository - type: number - sshCloneUrl: - description: URL that can be provided to git clone to clone the - repository via SSH. - type: string - svnUrl: - description: URL that can be provided to svn checkout to check - out the repository via GitHub's Subversion protocol emulation. - type: string - type: object - conditions: - description: Conditions of the resource. - items: - description: A Condition that may apply to a resource. - properties: - lastTransitionTime: - description: LastTransitionTime is the last time this condition - transitioned from one status to another. - format: date-time - type: string - message: - description: A Message containing details about this condition's - last transition from one status to another, if any. - type: string - reason: - description: A Reason for this condition's last transition from - one status to another. - type: string - status: - description: Status of this condition; is it currently True, - False, or Unknown? - type: string - type: - description: Type of this condition. At most one of each condition - type may apply to a resource at any point in time. - type: string - required: - - lastTransitionTime - - reason - - status - - type - type: object - type: array - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/repo.github.upbound.io_branches.yaml b/package/crds/repo.template.upbound.io_branches.yaml similarity index 80% rename from package/crds/repo.github.upbound.io_branches.yaml rename to package/crds/repo.template.upbound.io_branches.yaml index 687bc42..dc6d8c3 100644 --- a/package/crds/repo.github.upbound.io_branches.yaml +++ b/package/crds/repo.template.upbound.io_branches.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: branches.repo.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: branches.repo.template.upbound.io spec: - group: repo.github.upbound.io + group: repo.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -148,6 +151,48 @@ spec: of source_branch. If provided, source_branch is ignored. type: string type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + sourceSha: + description: The commit hash to start from. Defaults to the tip + of source_branch. If provided, source_branch is ignored. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -186,42 +231,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -333,9 +342,19 @@ spec: description: A string representing a branch reference, in the form of refs/heads/. type: string + repository: + description: The GitHub repository name. + type: string sha: description: A string storing the reference's HEAD commit's SHA1. type: string + sourceBranch: + description: The branch name to start from. Defaults to main. + type: string + sourceSha: + description: The commit hash to start from. Defaults to the tip + of source_branch. If provided, source_branch is ignored. + type: string type: object conditions: description: Conditions of the resource. @@ -370,6 +389,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -378,9 +400,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/repo.github.upbound.io_branchprotections.yaml b/package/crds/repo.template.upbound.io_branchprotections.yaml similarity index 57% rename from package/crds/repo.github.upbound.io_branchprotections.yaml rename to package/crds/repo.template.upbound.io_branchprotections.yaml index 341d76f..3940302 100644 --- a/package/crds/repo.github.upbound.io_branchprotections.yaml +++ b/package/crds/repo.template.upbound.io_branchprotections.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: branchprotections.repo.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: branchprotections.repo.template.upbound.io spec: - group: repo.github.upbound.io + group: repo.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -247,9 +250,151 @@ spec: type: boolean type: object type: array - required: - - pattern type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + allowsDeletions: + description: Boolean, setting this to true to allow the branch + to be deleted. + type: boolean + allowsForcePushes: + description: Boolean, setting this to true to allow force pushes + on the branch. + type: boolean + blocksCreations: + description: Boolean, setting this to true to block creating the + branch. + type: boolean + enforceAdmins: + description: Boolean, setting this to true enforces status checks + for repository administrators. + type: boolean + lockBranch: + description: Boolean, Setting this to true will make the branch + read-only and preventing any pushes to it. Defaults to false + type: boolean + pattern: + description: Identifies the protection rule pattern. + type: string + pushRestrictions: + description: The list of actor Names/IDs that may push to the + branch. Actor names must either begin with a "/" for users or + the organization name followed by a "/" for teams. + items: + type: string + type: array + requireConversationResolution: + description: Boolean, setting this to true requires all conversations + on code must be resolved before a pull request can be merged. + type: boolean + requireSignedCommits: + description: Boolean, setting this to true requires all commits + to be signed with GPG. + type: boolean + requiredLinearHistory: + description: Boolean, setting this to true enforces a linear commit + Git history, which prevents anyone from pushing merge commits + to a branch + type: boolean + requiredPullRequestReviews: + description: Enforce restrictions for pull request reviews. See + Required Pull Request Reviews below for details. + items: + properties: + dismissStaleReviews: + description: ': Dismiss approved reviews automatically + when a new commit is pushed. Defaults to false.' + type: boolean + dismissalRestrictions: + description: ': The list of actor Names/IDs with dismissal + access. If not empty, restrict_dismissals is ignored. + Actor names must either begin with a "/" for users or + the organization name followed by a "/" for teams.' + items: + type: string + type: array + pullRequestBypassers: + description: ': The list of actor Names/IDs that are allowed + to bypass pull request requirements. Actor names must + either begin with a "/" for users or the organization + name followed by a "/" for teams.' + items: + type: string + type: array + requireCodeOwnerReviews: + description: ': Require an approved review in pull requests + including files with a designated code owner. Defaults + to false.' + type: boolean + requireLastPushApproval: + description: ': Require that The most recent push must + be approved by someone other than the last pusher. Defaults + to false' + type: boolean + requiredApprovingReviewCount: + description: 6. This requirement matches GitHub's API, see + the upstream documentation for more information. (https://developer.github.com/v3/repos/branches/#parameters-1) + for more information. + type: number + restrictDismissals: + description: ': Restrict pull request review dismissals.' + type: boolean + type: object + type: array + requiredStatusChecks: + description: Enforce restrictions for required status checks. + See Required Status Checks below for details. + items: + properties: + contexts: + description: ': The list of status checks to require in + order to merge into this branch. No status checks are + required by default.' + items: + type: string + type: array + strict: + description: ': Require branches to be up to date before + merging. Defaults to false.' + type: boolean + type: object + type: array + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -288,42 +433,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -421,13 +530,128 @@ spec: required: - forProvider type: object + x-kubernetes-validations: + - message: spec.forProvider.pattern is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.pattern) + || (has(self.initProvider) && has(self.initProvider.pattern))' status: description: BranchProtectionStatus defines the observed state of BranchProtection. properties: atProvider: properties: + allowsDeletions: + description: Boolean, setting this to true to allow the branch + to be deleted. + type: boolean + allowsForcePushes: + description: Boolean, setting this to true to allow force pushes + on the branch. + type: boolean + blocksCreations: + description: Boolean, setting this to true to block creating the + branch. + type: boolean + enforceAdmins: + description: Boolean, setting this to true enforces status checks + for repository administrators. + type: boolean id: type: string + lockBranch: + description: Boolean, Setting this to true will make the branch + read-only and preventing any pushes to it. Defaults to false + type: boolean + pattern: + description: Identifies the protection rule pattern. + type: string + pushRestrictions: + description: The list of actor Names/IDs that may push to the + branch. Actor names must either begin with a "/" for users or + the organization name followed by a "/" for teams. + items: + type: string + type: array + repositoryId: + description: The name or node ID of the repository associated + with this branch protection rule. Node ID or name of repository + type: string + requireConversationResolution: + description: Boolean, setting this to true requires all conversations + on code must be resolved before a pull request can be merged. + type: boolean + requireSignedCommits: + description: Boolean, setting this to true requires all commits + to be signed with GPG. + type: boolean + requiredLinearHistory: + description: Boolean, setting this to true enforces a linear commit + Git history, which prevents anyone from pushing merge commits + to a branch + type: boolean + requiredPullRequestReviews: + description: Enforce restrictions for pull request reviews. See + Required Pull Request Reviews below for details. + items: + properties: + dismissStaleReviews: + description: ': Dismiss approved reviews automatically + when a new commit is pushed. Defaults to false.' + type: boolean + dismissalRestrictions: + description: ': The list of actor Names/IDs with dismissal + access. If not empty, restrict_dismissals is ignored. + Actor names must either begin with a "/" for users or + the organization name followed by a "/" for teams.' + items: + type: string + type: array + pullRequestBypassers: + description: ': The list of actor Names/IDs that are allowed + to bypass pull request requirements. Actor names must + either begin with a "/" for users or the organization + name followed by a "/" for teams.' + items: + type: string + type: array + requireCodeOwnerReviews: + description: ': Require an approved review in pull requests + including files with a designated code owner. Defaults + to false.' + type: boolean + requireLastPushApproval: + description: ': Require that The most recent push must + be approved by someone other than the last pusher. Defaults + to false' + type: boolean + requiredApprovingReviewCount: + description: 6. This requirement matches GitHub's API, see + the upstream documentation for more information. (https://developer.github.com/v3/repos/branches/#parameters-1) + for more information. + type: number + restrictDismissals: + description: ': Restrict pull request review dismissals.' + type: boolean + type: object + type: array + requiredStatusChecks: + description: Enforce restrictions for required status checks. + See Required Status Checks below for details. + items: + properties: + contexts: + description: ': The list of status checks to require in + order to merge into this branch. No status checks are + required by default.' + items: + type: string + type: array + strict: + description: ': Require branches to be up to date before + merging. Defaults to false.' + type: boolean + type: object + type: array type: object conditions: description: Conditions of the resource. @@ -462,6 +686,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -470,9 +697,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/repo.github.upbound.io_defaultbranches.yaml b/package/crds/repo.template.upbound.io_defaultbranches.yaml similarity index 82% rename from package/crds/repo.github.upbound.io_defaultbranches.yaml rename to package/crds/repo.template.upbound.io_defaultbranches.yaml index e977ea3..035cc93 100644 --- a/package/crds/repo.github.upbound.io_defaultbranches.yaml +++ b/package/crds/repo.template.upbound.io_defaultbranches.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: defaultbranches.repo.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: defaultbranches.repo.template.upbound.io spec: - group: repo.github.upbound.io + group: repo.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -141,6 +144,43 @@ spec: type: object type: object type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -179,42 +219,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -317,6 +321,9 @@ spec: properties: atProvider: properties: + branch: + description: The branch (e.g. main) + type: string id: type: string type: object @@ -353,6 +360,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -361,9 +371,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/repo.github.upbound.io_deploykeys.yaml b/package/crds/repo.template.upbound.io_deploykeys.yaml similarity index 76% rename from package/crds/repo.github.upbound.io_deploykeys.yaml rename to package/crds/repo.template.upbound.io_deploykeys.yaml index 00670e5..0e914e1 100644 --- a/package/crds/repo.github.upbound.io_deploykeys.yaml +++ b/package/crds/repo.template.upbound.io_deploykeys.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: deploykeys.repo.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: deploykeys.repo.template.upbound.io spec: - group: repo.github.upbound.io + group: repo.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -150,10 +153,55 @@ spec: title: description: A title. type: string - required: - - key - - title type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + key: + description: A SSH key. + type: string + readOnly: + description: A boolean qualifying the key to be either read only + or read/write. + type: boolean + title: + description: A title. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -192,42 +240,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -325,6 +337,15 @@ spec: required: - forProvider type: object + x-kubernetes-validations: + - message: spec.forProvider.key is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.key) + || (has(self.initProvider) && has(self.initProvider.key))' + - message: spec.forProvider.title is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.title) + || (has(self.initProvider) && has(self.initProvider.title))' status: description: DeployKeyStatus defines the observed state of DeployKey. properties: @@ -334,6 +355,19 @@ spec: type: string id: type: string + key: + description: A SSH key. + type: string + readOnly: + description: A boolean qualifying the key to be either read only + or read/write. + type: boolean + repository: + description: Name of the GitHub repository. + type: string + title: + description: A title. + type: string type: object conditions: description: Conditions of the resource. @@ -368,6 +402,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -376,9 +413,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/repo.github.upbound.io_pullrequests.yaml b/package/crds/repo.template.upbound.io_pullrequests.yaml similarity index 78% rename from package/crds/repo.github.upbound.io_pullrequests.yaml rename to package/crds/repo.template.upbound.io_pullrequests.yaml index 81d656a..6eab611 100644 --- a/package/crds/repo.github.upbound.io_pullrequests.yaml +++ b/package/crds/repo.template.upbound.io_pullrequests.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: pullrequests.repo.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: pullrequests.repo.template.upbound.io spec: - group: repo.github.upbound.io + group: repo.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -236,10 +239,63 @@ spec: title: description: The title of the Pull Request. type: string - required: - - baseRef - - title type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + baseRef: + description: Name of the branch serving as the base of the Pull + Request. + type: string + body: + description: Body of the Pull Request. + type: string + maintainerCanModify: + description: 'Controls whether the base repository maintainers + can modify the Pull Request. Default: false.' + type: boolean + owner: + description: Owner of the repository. If not provided, the provider's + default owner is used. + type: string + title: + description: The title of the Pull Request. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -278,42 +334,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -411,17 +431,41 @@ spec: required: - forProvider type: object + x-kubernetes-validations: + - message: spec.forProvider.baseRef is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.baseRef) + || (has(self.initProvider) && has(self.initProvider.baseRef))' + - message: spec.forProvider.title is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.title) + || (has(self.initProvider) && has(self.initProvider.title))' status: description: PullRequestStatus defines the observed state of PullRequest. properties: atProvider: properties: + baseRef: + description: Name of the branch serving as the base of the Pull + Request. + type: string + baseRepository: + description: Name of the base repository to retrieve the Pull + Requests from. + type: string baseSha: description: Head commit SHA of the Pull Request base. type: string + body: + description: Body of the Pull Request. + type: string draft: description: Indicates Whether this Pull Request is a draft. type: boolean + headRef: + description: Name of the branch serving as the head of the Pull + Request. + type: string headSha: description: Head commit SHA of the Pull Request head. type: string @@ -433,6 +477,10 @@ spec: items: type: string type: array + maintainerCanModify: + description: 'Controls whether the base repository maintainers + can modify the Pull Request. Default: false.' + type: boolean number: description: The number of the Pull Request within the repository. type: number @@ -444,10 +492,17 @@ spec: description: GitHub login of the user who opened the Pull Request. Username of the PR creator type: string + owner: + description: Owner of the repository. If not provided, the provider's + default owner is used. + type: string state: description: the current Pull Request state - can be "open", "closed" or "merged". type: string + title: + description: The title of the Pull Request. + type: string updatedAt: description: The timestamp of the last Pull Request update. type: number @@ -485,6 +540,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -493,9 +551,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/repo.template.upbound.io_repositories.yaml b/package/crds/repo.template.upbound.io_repositories.yaml new file mode 100644 index 0000000..693665e --- /dev/null +++ b/package/crds/repo.template.upbound.io_repositories.yaml @@ -0,0 +1,1054 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.13.0 + name: repositories.repo.template.upbound.io +spec: + group: repo.template.upbound.io + names: + categories: + - crossplane + - managed + - github + kind: Repository + listKind: RepositoryList + plural: repositories + singular: repository + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .metadata.annotations.crossplane\.io/external-name + name: EXTERNAL-NAME + type: string + - jsonPath: .metadata.creationTimestamp + name: AGE + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: Repository is the Schema for the Repositorys API. Creates and + manages repositories within GitHub organizations or personal accounts + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: RepositorySpec defines the desired state of Repository + properties: + deletionPolicy: + default: Delete + description: 'DeletionPolicy specifies what will happen to the underlying + external when this managed resource is deleted - either "Delete" + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' + enum: + - Orphan + - Delete + type: string + forProvider: + properties: + allowAutoMerge: + description: Set to true to allow auto-merging pull requests on + the repository. + type: boolean + allowMergeCommit: + description: Set to false to disable merge commits on the repository. + type: boolean + allowRebaseMerge: + description: Set to false to disable rebase merges on the repository. + type: boolean + allowSquashMerge: + description: Set to false to disable squash merges on the repository. + type: boolean + allowUpdateBranch: + description: Set to true to always suggest updating pull request + branches. + type: boolean + archiveOnDestroy: + description: Set to true to archive the repository instead of + deleting on destroy. + type: boolean + archived: + description: Specifies if the repository should be archived. Defaults + to false. NOTE Currently, the API does not support unarchiving. + type: boolean + autoInit: + description: Set to true to produce an initial commit in the repository. + type: boolean + defaultBranch: + description: '(Deprecated: Use github_branch_default resource + instead) The name of the default branch of the repository. NOTE: + This can only be set after a repository has already been created, + and after a correct reference has been created for the target + branch inside the repository. This means a user will have to + omit this parameter from the initial repository creation and + create the target branch inside of the repository prior to setting + this attribute. Can only be set after initial repository creation, + and only if the target branch exists' + type: string + deleteBranchOnMerge: + description: Automatically delete head branch after a pull request + is merged. Defaults to false. + type: boolean + description: + description: A description of the repository. + type: string + gitignoreTemplate: + description: Use the name of the template without the extension. + For example, "Haskell". + type: string + hasDiscussions: + description: Set to true to enable GitHub Discussions on the repository. + Defaults to false. + type: boolean + hasDownloads: + description: Set to true to enable the (deprecated) downloads + features on the repository. + type: boolean + hasIssues: + description: Set to true to enable the GitHub Issues features + on the repository. + type: boolean + hasProjects: + description: Set to true to enable the GitHub Projects features + on the repository. Per the GitHub documentation when in an organization + that has disabled repository projects it will default to false + and will otherwise default to true. If you specify true when + it has been disabled it will return an error. + type: boolean + hasWiki: + description: Set to true to enable the GitHub Wiki features on + the repository. + type: boolean + homepageUrl: + description: URL of a page describing the project. + type: string + ignoreVulnerabilityAlertsDuringRead: + description: Set to true to not call the vulnerability alerts + endpoint so the resource can also be used without admin permissions + during read. + type: boolean + isTemplate: + description: Set to true to tell GitHub that this is a template + repository. + type: boolean + licenseTemplate: + description: Use the name of the template without the extension. + For example, "mit" or "mpl-2.0". + type: string + mergeCommitMessage: + description: Can be PR_BODY, PR_TITLE, or BLANK for a default + merge commit message. + type: string + mergeCommitTitle: + description: Can be PR_TITLE or MERGE_MESSAGE for a default merge + commit title. + type: string + name: + description: The name of the repository. + type: string + pages: + description: The repository's GitHub Pages configuration. See + GitHub Pages Configuration below for details. + items: + properties: + cname: + description: The custom domain for the repository. This + can only be set after the repository has been created. + type: string + source: + description: The source branch and directory for the rendered + Pages site. See GitHub Pages Source below for details. + items: + properties: + branch: + description: The repository branch used to publish + the site's source files. (i.e. main or gh-pages. + type: string + path: + description: 'The repository directory from which + the site publishes (Default: /).' + type: string + type: object + type: array + type: object + type: array + private: + description: Set to true to create a private repository. Repositories + are created as public (e.g. open source) by default. + type: boolean + securityAndAnalysis: + description: The repository's security and analysis configuration. + See Security and Analysis Configuration below for details. Security + and analysis settings for the repository. To use this parameter + you must have admin permissions for the repository or be an + owner or security manager for the organization that owns the + repository. + items: + properties: + advancedSecurity: + description: The advanced security configuration for the + repository. See Advanced Security Configuration below + for details. If a repository's visibility is public, advanced + security is always enabled and cannot be changed, so this + setting cannot be supplied. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + secretScanning: + description: The secret scanning configuration for the repository. + See Secret Scanning Configuration below for details. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + secretScanningPushProtection: + description: The secret scanning push protection configuration + for the repository. See Secret Scanning Push Protection + Configuration below for details. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + type: object + type: array + squashMergeCommitMessage: + description: Can be PR_BODY, COMMIT_MESSAGES, or BLANK for a default + squash merge commit message. + type: string + squashMergeCommitTitle: + description: Can be PR_TITLE or COMMIT_OR_PR_TITLE for a default + squash merge commit title. + type: string + template: + description: Use a template repository to create this resource. + See Template Repositories below for details. + items: + properties: + includeAllBranches: + description: ': Whether the new repository should include + all the branches from the template repository (defaults + to false, which includes only the default branch from + the template).' + type: boolean + owner: + description: ': The GitHub organization or user the template + repository is owned by.' + type: string + repository: + description: ': The name of the template repository.' + type: string + type: object + type: array + topics: + description: The list of topics of the repository. + items: + type: string + type: array + visibility: + description: Can be public or private. If your organization is + associated with an enterprise account using GitHub Enterprise + Cloud or GitHub Enterprise Server 2.20+, visibility can also + be internal. The visibility parameter overrides the private + parameter. + type: string + vulnerabilityAlerts: + description: 'Set to true to enable security alerts for vulnerable + dependencies. Enabling requires alerts to be enabled on the + owner level. (Note for importing: GitHub enables the alerts + on public repos but disables them on private repos by default.) + See GitHub Documentation for details. Note that vulnerability + alerts have not been successfully tested on any GitHub Enterprise + instance and may be unavailable in those settings.' + type: boolean + type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + allowAutoMerge: + description: Set to true to allow auto-merging pull requests on + the repository. + type: boolean + allowMergeCommit: + description: Set to false to disable merge commits on the repository. + type: boolean + allowRebaseMerge: + description: Set to false to disable rebase merges on the repository. + type: boolean + allowSquashMerge: + description: Set to false to disable squash merges on the repository. + type: boolean + allowUpdateBranch: + description: Set to true to always suggest updating pull request + branches. + type: boolean + archiveOnDestroy: + description: Set to true to archive the repository instead of + deleting on destroy. + type: boolean + archived: + description: Specifies if the repository should be archived. Defaults + to false. NOTE Currently, the API does not support unarchiving. + type: boolean + autoInit: + description: Set to true to produce an initial commit in the repository. + type: boolean + defaultBranch: + description: '(Deprecated: Use github_branch_default resource + instead) The name of the default branch of the repository. NOTE: + This can only be set after a repository has already been created, + and after a correct reference has been created for the target + branch inside the repository. This means a user will have to + omit this parameter from the initial repository creation and + create the target branch inside of the repository prior to setting + this attribute. Can only be set after initial repository creation, + and only if the target branch exists' + type: string + deleteBranchOnMerge: + description: Automatically delete head branch after a pull request + is merged. Defaults to false. + type: boolean + description: + description: A description of the repository. + type: string + gitignoreTemplate: + description: Use the name of the template without the extension. + For example, "Haskell". + type: string + hasDiscussions: + description: Set to true to enable GitHub Discussions on the repository. + Defaults to false. + type: boolean + hasDownloads: + description: Set to true to enable the (deprecated) downloads + features on the repository. + type: boolean + hasIssues: + description: Set to true to enable the GitHub Issues features + on the repository. + type: boolean + hasProjects: + description: Set to true to enable the GitHub Projects features + on the repository. Per the GitHub documentation when in an organization + that has disabled repository projects it will default to false + and will otherwise default to true. If you specify true when + it has been disabled it will return an error. + type: boolean + hasWiki: + description: Set to true to enable the GitHub Wiki features on + the repository. + type: boolean + homepageUrl: + description: URL of a page describing the project. + type: string + ignoreVulnerabilityAlertsDuringRead: + description: Set to true to not call the vulnerability alerts + endpoint so the resource can also be used without admin permissions + during read. + type: boolean + isTemplate: + description: Set to true to tell GitHub that this is a template + repository. + type: boolean + licenseTemplate: + description: Use the name of the template without the extension. + For example, "mit" or "mpl-2.0". + type: string + mergeCommitMessage: + description: Can be PR_BODY, PR_TITLE, or BLANK for a default + merge commit message. + type: string + mergeCommitTitle: + description: Can be PR_TITLE or MERGE_MESSAGE for a default merge + commit title. + type: string + name: + description: The name of the repository. + type: string + pages: + description: The repository's GitHub Pages configuration. See + GitHub Pages Configuration below for details. + items: + properties: + cname: + description: The custom domain for the repository. This + can only be set after the repository has been created. + type: string + source: + description: The source branch and directory for the rendered + Pages site. See GitHub Pages Source below for details. + items: + properties: + branch: + description: The repository branch used to publish + the site's source files. (i.e. main or gh-pages. + type: string + path: + description: 'The repository directory from which + the site publishes (Default: /).' + type: string + type: object + type: array + type: object + type: array + private: + description: Set to true to create a private repository. Repositories + are created as public (e.g. open source) by default. + type: boolean + securityAndAnalysis: + description: The repository's security and analysis configuration. + See Security and Analysis Configuration below for details. Security + and analysis settings for the repository. To use this parameter + you must have admin permissions for the repository or be an + owner or security manager for the organization that owns the + repository. + items: + properties: + advancedSecurity: + description: The advanced security configuration for the + repository. See Advanced Security Configuration below + for details. If a repository's visibility is public, advanced + security is always enabled and cannot be changed, so this + setting cannot be supplied. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + secretScanning: + description: The secret scanning configuration for the repository. + See Secret Scanning Configuration below for details. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + secretScanningPushProtection: + description: The secret scanning push protection configuration + for the repository. See Secret Scanning Push Protection + Configuration below for details. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + type: object + type: array + squashMergeCommitMessage: + description: Can be PR_BODY, COMMIT_MESSAGES, or BLANK for a default + squash merge commit message. + type: string + squashMergeCommitTitle: + description: Can be PR_TITLE or COMMIT_OR_PR_TITLE for a default + squash merge commit title. + type: string + template: + description: Use a template repository to create this resource. + See Template Repositories below for details. + items: + properties: + includeAllBranches: + description: ': Whether the new repository should include + all the branches from the template repository (defaults + to false, which includes only the default branch from + the template).' + type: boolean + owner: + description: ': The GitHub organization or user the template + repository is owned by.' + type: string + repository: + description: ': The name of the template repository.' + type: string + type: object + type: array + topics: + description: The list of topics of the repository. + items: + type: string + type: array + visibility: + description: Can be public or private. If your organization is + associated with an enterprise account using GitHub Enterprise + Cloud or GitHub Enterprise Server 2.20+, visibility can also + be internal. The visibility parameter overrides the private + parameter. + type: string + vulnerabilityAlerts: + description: 'Set to true to enable security alerts for vulnerable + dependencies. Enabling requires alerts to be enabled on the + owner level. (Note for importing: GitHub enables the alerts + on public repos but disables them on private repos by default.) + See GitHub Documentation for details. Note that vulnerability + alerts have not been successfully tested on any GitHub Enterprise + instance and may be unavailable in those settings.' + type: boolean + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array + providerConfigRef: + default: + name: default + description: ProviderConfigReference specifies how the provider that + will be used to create, observe, update, and delete this managed + resource should be configured. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of this + reference is required. The default is 'Required', which + means the reconcile will fail if the reference cannot be + resolved. 'Optional' means this reference will be a no-op + if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will attempt + to resolve the reference only when the corresponding field + is not present. Use 'Always' to resolve the reference on + every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + publishConnectionDetailsTo: + description: PublishConnectionDetailsTo specifies the connection secret + config which contains a name, metadata and a reference to secret + store config to which any connection details for this managed resource + should be written. Connection details frequently include the endpoint, + username, and password required to connect to the managed resource. + properties: + configRef: + default: + name: default + description: SecretStoreConfigRef specifies which secret store + config should be used for this ConnectionSecret. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + metadata: + description: Metadata is the metadata for connection secret. + properties: + annotations: + additionalProperties: + type: string + description: Annotations are the annotations to be added to + connection secret. - For Kubernetes secrets, this will be + used as "metadata.annotations". - It is up to Secret Store + implementation for others store types. + type: object + labels: + additionalProperties: + type: string + description: Labels are the labels/tags to be added to connection + secret. - For Kubernetes secrets, this will be used as "metadata.labels". + - It is up to Secret Store implementation for others store + types. + type: object + type: + description: Type is the SecretType for the connection secret. + - Only valid for Kubernetes Secret Stores. + type: string + type: object + name: + description: Name is the name of the connection secret. + type: string + required: + - name + type: object + writeConnectionSecretToRef: + description: WriteConnectionSecretToReference specifies the namespace + and name of a Secret to which any connection details for this managed + resource should be written. Connection details frequently include + the endpoint, username, and password required to connect to the + managed resource. This field is planned to be replaced in a future + release in favor of PublishConnectionDetailsTo. Currently, both + could be set independently and connection details would be published + to both without affecting each other. + properties: + name: + description: Name of the secret. + type: string + namespace: + description: Namespace of the secret. + type: string + required: + - name + - namespace + type: object + required: + - forProvider + type: object + x-kubernetes-validations: + - message: spec.forProvider.name is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.name) + || (has(self.initProvider) && has(self.initProvider.name))' + status: + description: RepositoryStatus defines the observed state of Repository. + properties: + atProvider: + properties: + allowAutoMerge: + description: Set to true to allow auto-merging pull requests on + the repository. + type: boolean + allowMergeCommit: + description: Set to false to disable merge commits on the repository. + type: boolean + allowRebaseMerge: + description: Set to false to disable rebase merges on the repository. + type: boolean + allowSquashMerge: + description: Set to false to disable squash merges on the repository. + type: boolean + allowUpdateBranch: + description: Set to true to always suggest updating pull request + branches. + type: boolean + archiveOnDestroy: + description: Set to true to archive the repository instead of + deleting on destroy. + type: boolean + archived: + description: Specifies if the repository should be archived. Defaults + to false. NOTE Currently, the API does not support unarchiving. + type: boolean + autoInit: + description: Set to true to produce an initial commit in the repository. + type: boolean + defaultBranch: + description: '(Deprecated: Use github_branch_default resource + instead) The name of the default branch of the repository. NOTE: + This can only be set after a repository has already been created, + and after a correct reference has been created for the target + branch inside the repository. This means a user will have to + omit this parameter from the initial repository creation and + create the target branch inside of the repository prior to setting + this attribute. Can only be set after initial repository creation, + and only if the target branch exists' + type: string + deleteBranchOnMerge: + description: Automatically delete head branch after a pull request + is merged. Defaults to false. + type: boolean + description: + description: A description of the repository. + type: string + etag: + type: string + fullName: + description: A string of the form "orgname/reponame". + type: string + gitCloneUrl: + description: URL that can be provided to git clone to clone the + repository anonymously via the git protocol. + type: string + gitignoreTemplate: + description: Use the name of the template without the extension. + For example, "Haskell". + type: string + hasDiscussions: + description: Set to true to enable GitHub Discussions on the repository. + Defaults to false. + type: boolean + hasDownloads: + description: Set to true to enable the (deprecated) downloads + features on the repository. + type: boolean + hasIssues: + description: Set to true to enable the GitHub Issues features + on the repository. + type: boolean + hasProjects: + description: Set to true to enable the GitHub Projects features + on the repository. Per the GitHub documentation when in an organization + that has disabled repository projects it will default to false + and will otherwise default to true. If you specify true when + it has been disabled it will return an error. + type: boolean + hasWiki: + description: Set to true to enable the GitHub Wiki features on + the repository. + type: boolean + homepageUrl: + description: URL of a page describing the project. + type: string + htmlUrl: + description: URL to the repository on the web. + type: string + httpCloneUrl: + description: URL that can be provided to git clone to clone the + repository via HTTPS. + type: string + id: + type: string + ignoreVulnerabilityAlertsDuringRead: + description: Set to true to not call the vulnerability alerts + endpoint so the resource can also be used without admin permissions + during read. + type: boolean + isTemplate: + description: Set to true to tell GitHub that this is a template + repository. + type: boolean + licenseTemplate: + description: Use the name of the template without the extension. + For example, "mit" or "mpl-2.0". + type: string + mergeCommitMessage: + description: Can be PR_BODY, PR_TITLE, or BLANK for a default + merge commit message. + type: string + mergeCommitTitle: + description: Can be PR_TITLE or MERGE_MESSAGE for a default merge + commit title. + type: string + name: + description: The name of the repository. + type: string + nodeId: + description: GraphQL global node id for use with v4 API + type: string + pages: + description: The repository's GitHub Pages configuration. See + GitHub Pages Configuration below for details. + items: + properties: + cname: + description: The custom domain for the repository. This + can only be set after the repository has been created. + type: string + custom404: + description: Whether the rendered GitHub Pages site has + a custom 404 page. + type: boolean + htmlUrl: + description: URL to the repository on the web. + type: string + source: + description: The source branch and directory for the rendered + Pages site. See GitHub Pages Source below for details. + items: + properties: + branch: + description: The repository branch used to publish + the site's source files. (i.e. main or gh-pages. + type: string + path: + description: 'The repository directory from which + the site publishes (Default: /).' + type: string + type: object + type: array + status: + description: Set to enabled to enable secret scanning on + the repository. Can be enabled or disabled. If set to + enabled, the repository's visibility must be public or + security_and_analysis[0].advanced_security[0].status must + also be set to enabled. + type: string + url: + type: string + type: object + type: array + private: + description: Set to true to create a private repository. Repositories + are created as public (e.g. open source) by default. + type: boolean + repoId: + description: GitHub ID for the repository + type: number + securityAndAnalysis: + description: The repository's security and analysis configuration. + See Security and Analysis Configuration below for details. Security + and analysis settings for the repository. To use this parameter + you must have admin permissions for the repository or be an + owner or security manager for the organization that owns the + repository. + items: + properties: + advancedSecurity: + description: The advanced security configuration for the + repository. See Advanced Security Configuration below + for details. If a repository's visibility is public, advanced + security is always enabled and cannot be changed, so this + setting cannot be supplied. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + secretScanning: + description: The secret scanning configuration for the repository. + See Secret Scanning Configuration below for details. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + secretScanningPushProtection: + description: The secret scanning push protection configuration + for the repository. See Secret Scanning Push Protection + Configuration below for details. + items: + properties: + status: + description: Set to enabled to enable secret scanning + on the repository. Can be enabled or disabled. If + set to enabled, the repository's visibility must + be public or security_and_analysis[0].advanced_security[0].status + must also be set to enabled. + type: string + type: object + type: array + type: object + type: array + squashMergeCommitMessage: + description: Can be PR_BODY, COMMIT_MESSAGES, or BLANK for a default + squash merge commit message. + type: string + squashMergeCommitTitle: + description: Can be PR_TITLE or COMMIT_OR_PR_TITLE for a default + squash merge commit title. + type: string + sshCloneUrl: + description: URL that can be provided to git clone to clone the + repository via SSH. + type: string + svnUrl: + description: URL that can be provided to svn checkout to check + out the repository via GitHub's Subversion protocol emulation. + type: string + template: + description: Use a template repository to create this resource. + See Template Repositories below for details. + items: + properties: + includeAllBranches: + description: ': Whether the new repository should include + all the branches from the template repository (defaults + to false, which includes only the default branch from + the template).' + type: boolean + owner: + description: ': The GitHub organization or user the template + repository is owned by.' + type: string + repository: + description: ': The name of the template repository.' + type: string + type: object + type: array + topics: + description: The list of topics of the repository. + items: + type: string + type: array + visibility: + description: Can be public or private. If your organization is + associated with an enterprise account using GitHub Enterprise + Cloud or GitHub Enterprise Server 2.20+, visibility can also + be internal. The visibility parameter overrides the private + parameter. + type: string + vulnerabilityAlerts: + description: 'Set to true to enable security alerts for vulnerable + dependencies. Enabling requires alerts to be enabled on the + owner level. (Note for importing: GitHub enables the alerts + on public repos but disables them on private repos by default.) + See GitHub Documentation for details. Note that vulnerability + alerts have not been successfully tested on any GitHub Enterprise + instance and may be unavailable in those settings.' + type: boolean + type: object + conditions: + description: Conditions of the resource. + items: + description: A Condition that may apply to a resource. + properties: + lastTransitionTime: + description: LastTransitionTime is the last time this condition + transitioned from one status to another. + format: date-time + type: string + message: + description: A Message containing details about this condition's + last transition from one status to another, if any. + type: string + reason: + description: A Reason for this condition's last transition from + one status to another. + type: string + status: + description: Status of this condition; is it currently True, + False, or Unknown? + type: string + type: + description: Type of this condition. At most one of each condition + type may apply to a resource at any point in time. + type: string + required: + - lastTransitionTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/repo.github.upbound.io_repositoryfiles.yaml b/package/crds/repo.template.upbound.io_repositoryfiles.yaml similarity index 72% rename from package/crds/repo.github.upbound.io_repositoryfiles.yaml rename to package/crds/repo.template.upbound.io_repositoryfiles.yaml index e937ed3..09da37a 100644 --- a/package/crds/repo.github.upbound.io_repositoryfiles.yaml +++ b/package/crds/repo.template.upbound.io_repositoryfiles.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: repositoryfiles.repo.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: repositoryfiles.repo.template.upbound.io spec: - group: repo.github.upbound.io + group: repo.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -253,10 +256,79 @@ spec: type: string type: object type: object - required: - - content - - file type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + commitAuthor: + description: 'Committer author name to use. NOTE: GitHub app users + may omit author and email information so GitHub can verify commits + as the GitHub App. This maybe useful when a branch protection + rule requires signed commits. The commit author name, defaults + to the authenticated user''s name. GitHub app users may omit + author and email information so GitHub can verify commits as + the GitHub App.' + type: string + commitEmail: + description: 'Committer email address to use. NOTE: GitHub app + users may omit author and email information so GitHub can verify + commits as the GitHub App. This may be useful when a branch + protection rule requires signed commits. The commit author email + address, defaults to the authenticated user''s email address. + GitHub app users may omit author and email information so GitHub + can verify commits as the GitHub App.' + type: string + commitMessage: + description: Commit message when adding or updating the managed + file. The commit message when creating, updating or deleting + the file + type: string + content: + description: The file content. The file's content + type: string + file: + description: The path of the file to manage. The file path to + manage + type: string + overwriteOnCreate: + description: Enable overwriting existing files Enable overwriting + existing files, defaults to "false" + type: boolean + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -295,42 +367,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -428,17 +464,69 @@ spec: required: - forProvider type: object + x-kubernetes-validations: + - message: spec.forProvider.content is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.content) + || (has(self.initProvider) && has(self.initProvider.content))' + - message: spec.forProvider.file is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.file) + || (has(self.initProvider) && has(self.initProvider.file))' status: description: RepositoryFileStatus defines the observed state of RepositoryFile. properties: atProvider: properties: + branch: + description: Git branch (defaults to main). The branch must already + exist, it will not be created if it does not already exist. + The branch name, defaults to "main" + type: string + commitAuthor: + description: 'Committer author name to use. NOTE: GitHub app users + may omit author and email information so GitHub can verify commits + as the GitHub App. This maybe useful when a branch protection + rule requires signed commits. The commit author name, defaults + to the authenticated user''s name. GitHub app users may omit + author and email information so GitHub can verify commits as + the GitHub App.' + type: string + commitEmail: + description: 'Committer email address to use. NOTE: GitHub app + users may omit author and email information so GitHub can verify + commits as the GitHub App. This may be useful when a branch + protection rule requires signed commits. The commit author email + address, defaults to the authenticated user''s email address. + GitHub app users may omit author and email information so GitHub + can verify commits as the GitHub App.' + type: string + commitMessage: + description: Commit message when adding or updating the managed + file. The commit message when creating, updating or deleting + the file + type: string commitSha: description: The SHA of the commit that modified the file. The SHA of the commit that modified the file type: string + content: + description: The file content. The file's content + type: string + file: + description: The path of the file to manage. The file path to + manage + type: string id: type: string + overwriteOnCreate: + description: Enable overwriting existing files Enable overwriting + existing files, defaults to "false" + type: boolean + repository: + description: The repository to create the file in. The repository + name + type: string sha: description: The SHA blob of the file. The blob SHA of the file type: string @@ -476,6 +564,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -484,9 +575,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/team.github.upbound.io_teamrepositories.yaml b/package/crds/team.template.upbound.io_teamrepositories.yaml similarity index 82% rename from package/crds/team.github.upbound.io_teamrepositories.yaml rename to package/crds/team.template.upbound.io_teamrepositories.yaml index 74cb7d5..029cfe7 100644 --- a/package/crds/team.github.upbound.io_teamrepositories.yaml +++ b/package/crds/team.template.upbound.io_teamrepositories.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: teamrepositories.team.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: teamrepositories.team.template.upbound.io spec: - group: team.github.upbound.io + group: team.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -224,6 +227,50 @@ spec: type: object type: object type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + permission: + description: The permissions of team members regarding the repository. + Must be one of pull, triage, push, maintain, admin or the name + of an existing custom repository role within the organisation. + Defaults to pull. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -262,42 +309,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -404,6 +415,19 @@ spec: type: string id: type: string + permission: + description: The permissions of team members regarding the repository. + Must be one of pull, triage, push, maintain, admin or the name + of an existing custom repository role within the organisation. + Defaults to pull. + type: string + repository: + description: The repository to add to the team. + type: string + teamId: + description: The GitHub team id or the GitHub team slug ID or + slug of team + type: string type: object conditions: description: Conditions of the resource. @@ -438,6 +462,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -446,9 +473,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/package/crds/team.github.upbound.io_teams.yaml b/package/crds/team.template.upbound.io_teams.yaml similarity index 69% rename from package/crds/team.github.upbound.io_teams.yaml rename to package/crds/team.template.upbound.io_teams.yaml index 419f5c8..390ef46 100644 --- a/package/crds/team.github.upbound.io_teams.yaml +++ b/package/crds/team.template.upbound.io_teams.yaml @@ -3,11 +3,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.8.0 - creationTimestamp: null - name: teams.team.github.upbound.io + controller-gen.kubebuilder.io/version: v0.13.0 + name: teams.team.template.upbound.io spec: - group: team.github.upbound.io + group: team.template.upbound.io names: categories: - crossplane @@ -55,9 +54,13 @@ spec: properties: deletionPolicy: default: Delete - description: DeletionPolicy specifies what will happen to the underlying + description: 'DeletionPolicy specifies what will happen to the underlying external when this managed resource is deleted - either "Delete" - or "Orphan" the external resource. + or "Orphan" the external resource. This field is planned to be deprecated + in favor of the ManagementPolicies field in a future release. Currently, + both could be set independently and non-default values would be + honored if the feature flag is enabled. See the design doc for more + information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223' enum: - Orphan - Delete @@ -85,9 +88,66 @@ spec: description: The level of privacy for the team. Must be one of secret or closed. Defaults to secret. type: string - required: - - name type: object + initProvider: + description: THIS IS A BETA FIELD. It will be honored unless the Management + Policies feature flag is disabled. InitProvider holds the same fields + as ForProvider, with the exception of Identifier and other resource + reference fields. The fields that are in InitProvider are merged + into ForProvider when the resource is created. The same fields are + also added to the terraform ignore_changes hook, to avoid updating + them after creation. This is useful for fields that are required + on creation, but we do not desire to update them after creation, + for example because of an external controller is managing them, + like an autoscaler. + properties: + createDefaultMaintainer: + description: Adds a default maintainer to the team. Defaults to + false and adds the creating user to the team when true. + type: boolean + description: + description: A description of the team. + type: string + ldapDn: + description: The LDAP Distinguished Name of the group where membership + will be synchronized. Only available in GitHub Enterprise Server. + type: string + name: + description: The name of the team. + type: string + parentTeamId: + description: The ID of the parent team, if this is a nested team. + type: number + privacy: + description: The level of privacy for the team. Must be one of + secret or closed. Defaults to secret. + type: string + type: object + managementPolicies: + default: + - '*' + description: 'THIS IS A BETA FIELD. It is on by default but can be + opted out through a Crossplane feature flag. ManagementPolicies + specify the array of actions Crossplane is allowed to take on the + managed and external resources. This field is planned to replace + the DeletionPolicy field in a future release. Currently, both could + be set independently and non-default values would be honored if + the feature flag is enabled. If both are custom, the DeletionPolicy + field will be ignored. See the design doc for more information: + https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 + and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md' + items: + description: A ManagementAction represents an action that the Crossplane + controllers can take on an external resource. + enum: + - Observe + - Create + - Update + - Delete + - LateInitialize + - '*' + type: string + type: array providerConfigRef: default: name: default @@ -126,42 +186,6 @@ spec: required: - name type: object - providerRef: - description: 'ProviderReference specifies the provider that will be - used to create, observe, update, and delete this managed resource. - Deprecated: Please use ProviderConfigReference, i.e. `providerConfigRef`' - properties: - name: - description: Name of the referenced object. - type: string - policy: - description: Policies for referencing. - properties: - resolution: - default: Required - description: Resolution specifies whether resolution of this - reference is required. The default is 'Required', which - means the reconcile will fail if the reference cannot be - resolved. 'Optional' means this reference will be a no-op - if it cannot be resolved. - enum: - - Required - - Optional - type: string - resolve: - description: Resolve specifies when this reference should - be resolved. The default is 'IfNotPresent', which will attempt - to resolve the reference only when the corresponding field - is not present. Use 'Always' to resolve the reference on - every reconcile. - enum: - - Always - - IfNotPresent - type: string - type: object - required: - - name - type: object publishConnectionDetailsTo: description: PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret @@ -259,21 +283,47 @@ spec: required: - forProvider type: object + x-kubernetes-validations: + - message: spec.forProvider.name is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.name) + || (has(self.initProvider) && has(self.initProvider.name))' status: description: TeamStatus defines the observed state of Team. properties: atProvider: properties: + createDefaultMaintainer: + description: Adds a default maintainer to the team. Defaults to + false and adds the creating user to the team when true. + type: boolean + description: + description: A description of the team. + type: string etag: type: string id: description: The ID of the created team. type: string + ldapDn: + description: The LDAP Distinguished Name of the group where membership + will be synchronized. Only available in GitHub Enterprise Server. + type: string membersCount: type: number + name: + description: The name of the team. + type: string nodeId: description: The Node ID of the created team. type: string + parentTeamId: + description: The ID of the parent team, if this is a nested team. + type: number + privacy: + description: The level of privacy for the team. Must be one of + secret or closed. Defaults to secret. + type: string slug: description: The slug of the created team, which may or may not differ from name, depending on whether name contains "URL-unsafe" @@ -313,6 +363,9 @@ spec: - type type: object type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map type: object required: - spec @@ -321,9 +374,3 @@ spec: storage: true subresources: status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] From f491ffe7cde792c98643559b8d98459fc67176f3 Mon Sep 17 00:00:00 2001 From: Atze de Vries Date: Mon, 5 Feb 2024 15:53:00 +0100 Subject: [PATCH 2/7] add deleted files to commit --- .../v1alpha1/zz_generated.resolvers.go | 40 ---- apis/repo/v1alpha1/zz_generated.resolvers.go | 201 ------------------ apis/team/v1alpha1/zz_generated.resolvers.go | 56 ----- apis/v1beta1/zz_generated.pc.go | 28 --- apis/v1beta1/zz_generated.pcu.go | 28 --- apis/v1beta1/zz_generated.pculist.go | 17 -- 6 files changed, 370 deletions(-) delete mode 100644 apis/actions/v1alpha1/zz_generated.resolvers.go delete mode 100644 apis/repo/v1alpha1/zz_generated.resolvers.go delete mode 100644 apis/team/v1alpha1/zz_generated.resolvers.go delete mode 100644 apis/v1beta1/zz_generated.pc.go delete mode 100644 apis/v1beta1/zz_generated.pcu.go delete mode 100644 apis/v1beta1/zz_generated.pculist.go diff --git a/apis/actions/v1alpha1/zz_generated.resolvers.go b/apis/actions/v1alpha1/zz_generated.resolvers.go deleted file mode 100644 index 738ada2..0000000 --- a/apis/actions/v1alpha1/zz_generated.resolvers.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" - reference "github.com/crossplane/crossplane-runtime/pkg/reference" - errors "github.com/pkg/errors" - client "sigs.k8s.io/controller-runtime/pkg/client" -) - -// ResolveReferences of this ActionsSecret. -func (mg *ActionsSecret) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.RepositoryRef, - Selector: mg.Spec.ForProvider.RepositorySelector, - To: reference.To{ - List: &v1alpha1.RepositoryList{}, - Managed: &v1alpha1.Repository{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Repository") - } - mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference - - return nil -} diff --git a/apis/repo/v1alpha1/zz_generated.resolvers.go b/apis/repo/v1alpha1/zz_generated.resolvers.go deleted file mode 100644 index f0ce74b..0000000 --- a/apis/repo/v1alpha1/zz_generated.resolvers.go +++ /dev/null @@ -1,201 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - reference "github.com/crossplane/crossplane-runtime/pkg/reference" - errors "github.com/pkg/errors" - client "sigs.k8s.io/controller-runtime/pkg/client" -) - -// ResolveReferences of this Branch. -func (mg *Branch) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.RepositoryRef, - Selector: mg.Spec.ForProvider.RepositorySelector, - To: reference.To{ - List: &RepositoryList{}, - Managed: &Repository{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Repository") - } - mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference - - return nil -} - -// ResolveReferences of this BranchProtection. -func (mg *BranchProtection) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RepositoryID), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.RepositoryIDRef, - Selector: mg.Spec.ForProvider.RepositoryIDSelector, - To: reference.To{ - List: &RepositoryList{}, - Managed: &Repository{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.RepositoryID") - } - mg.Spec.ForProvider.RepositoryID = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.RepositoryIDRef = rsp.ResolvedReference - - return nil -} - -// ResolveReferences of this DefaultBranch. -func (mg *DefaultBranch) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Branch), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.BranchRef, - Selector: mg.Spec.ForProvider.BranchSelector, - To: reference.To{ - List: &BranchList{}, - Managed: &Branch{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Branch") - } - mg.Spec.ForProvider.Branch = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.BranchRef = rsp.ResolvedReference - - return nil -} - -// ResolveReferences of this DeployKey. -func (mg *DeployKey) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.RepositoryRef, - Selector: mg.Spec.ForProvider.RepositorySelector, - To: reference.To{ - List: &RepositoryList{}, - Managed: &Repository{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Repository") - } - mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference - - return nil -} - -// ResolveReferences of this PullRequest. -func (mg *PullRequest) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.BaseRepository), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.BaseRepositoryRef, - Selector: mg.Spec.ForProvider.BaseRepositorySelector, - To: reference.To{ - List: &RepositoryList{}, - Managed: &Repository{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.BaseRepository") - } - mg.Spec.ForProvider.BaseRepository = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.BaseRepositoryRef = rsp.ResolvedReference - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.HeadRef), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.HeadRefRef, - Selector: mg.Spec.ForProvider.HeadRefSelector, - To: reference.To{ - List: &BranchList{}, - Managed: &Branch{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.HeadRef") - } - mg.Spec.ForProvider.HeadRef = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.HeadRefRef = rsp.ResolvedReference - - return nil -} - -// ResolveReferences of this RepositoryFile. -func (mg *RepositoryFile) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Branch), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.BranchRef, - Selector: mg.Spec.ForProvider.BranchSelector, - To: reference.To{ - List: &BranchList{}, - Managed: &Branch{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Branch") - } - mg.Spec.ForProvider.Branch = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.BranchRef = rsp.ResolvedReference - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.RepositoryRef, - Selector: mg.Spec.ForProvider.RepositorySelector, - To: reference.To{ - List: &RepositoryList{}, - Managed: &Repository{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Repository") - } - mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference - - return nil -} diff --git a/apis/team/v1alpha1/zz_generated.resolvers.go b/apis/team/v1alpha1/zz_generated.resolvers.go deleted file mode 100644 index 78e19c6..0000000 --- a/apis/team/v1alpha1/zz_generated.resolvers.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" - reference "github.com/crossplane/crossplane-runtime/pkg/reference" - errors "github.com/pkg/errors" - client "sigs.k8s.io/controller-runtime/pkg/client" -) - -// ResolveReferences of this TeamRepository. -func (mg *TeamRepository) ResolveReferences(ctx context.Context, c client.Reader) error { - r := reference.NewAPIResolver(c, mg) - - var rsp reference.ResolutionResponse - var err error - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.RepositoryRef, - Selector: mg.Spec.ForProvider.RepositorySelector, - To: reference.To{ - List: &v1alpha1.RepositoryList{}, - Managed: &v1alpha1.Repository{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.Repository") - } - mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference - - rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ - CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TeamID), - Extract: reference.ExternalName(), - Reference: mg.Spec.ForProvider.TeamIDRef, - Selector: mg.Spec.ForProvider.TeamIDSelector, - To: reference.To{ - List: &TeamList{}, - Managed: &Team{}, - }, - }) - if err != nil { - return errors.Wrap(err, "mg.Spec.ForProvider.TeamID") - } - mg.Spec.ForProvider.TeamID = reference.ToPtrValue(rsp.ResolvedValue) - mg.Spec.ForProvider.TeamIDRef = rsp.ResolvedReference - - return nil -} diff --git a/apis/v1beta1/zz_generated.pc.go b/apis/v1beta1/zz_generated.pc.go deleted file mode 100644 index c597006..0000000 --- a/apis/v1beta1/zz_generated.pc.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1beta1 - -import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" - -// GetCondition of this ProviderConfig. -func (p *ProviderConfig) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return p.Status.GetCondition(ct) -} - -// GetUsers of this ProviderConfig. -func (p *ProviderConfig) GetUsers() int64 { - return p.Status.Users -} - -// SetConditions of this ProviderConfig. -func (p *ProviderConfig) SetConditions(c ...xpv1.Condition) { - p.Status.SetConditions(c...) -} - -// SetUsers of this ProviderConfig. -func (p *ProviderConfig) SetUsers(i int64) { - p.Status.Users = i -} diff --git a/apis/v1beta1/zz_generated.pcu.go b/apis/v1beta1/zz_generated.pcu.go deleted file mode 100644 index a4f4986..0000000 --- a/apis/v1beta1/zz_generated.pcu.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1beta1 - -import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" - -// GetProviderConfigReference of this ProviderConfigUsage. -func (p *ProviderConfigUsage) GetProviderConfigReference() xpv1.Reference { - return p.ProviderConfigReference -} - -// GetResourceReference of this ProviderConfigUsage. -func (p *ProviderConfigUsage) GetResourceReference() xpv1.TypedReference { - return p.ResourceReference -} - -// SetProviderConfigReference of this ProviderConfigUsage. -func (p *ProviderConfigUsage) SetProviderConfigReference(r xpv1.Reference) { - p.ProviderConfigReference = r -} - -// SetResourceReference of this ProviderConfigUsage. -func (p *ProviderConfigUsage) SetResourceReference(r xpv1.TypedReference) { - p.ResourceReference = r -} diff --git a/apis/v1beta1/zz_generated.pculist.go b/apis/v1beta1/zz_generated.pculist.go deleted file mode 100644 index b3ae1b4..0000000 --- a/apis/v1beta1/zz_generated.pculist.go +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1beta1 - -import resource "github.com/crossplane/crossplane-runtime/pkg/resource" - -// GetItems of this ProviderConfigUsageList. -func (p *ProviderConfigUsageList) GetItems() []resource.ProviderConfigUsage { - items := make([]resource.ProviderConfigUsage, len(p.Items)) - for i := range p.Items { - items[i] = &p.Items[i] - } - return items -} From dac7bb8eb18d08632f6556584ff9d6b3154253b1 Mon Sep 17 00:00:00 2001 From: Atze de Vries Date: Tue, 6 Feb 2024 09:15:49 +0100 Subject: [PATCH 3/7] update crossplane-tools and crossplane-runtime --- apis/actions/v1alpha1/zz_generated.managed.go | 26 +-- .../v1alpha1/zz_generated.resolvers.go | 40 ++++ apis/repo/v1alpha1/zz_generated.managed.go | 182 ++++++---------- apis/repo/v1alpha1/zz_generated.resolvers.go | 201 ++++++++++++++++++ apis/team/v1alpha1/zz_generated.managed.go | 52 ++--- apis/team/v1alpha1/zz_generated.resolvers.go | 56 +++++ apis/v1beta1/zz_generated.pc.go | 28 +++ apis/v1beta1/zz_generated.pcu.go | 28 +++ apis/v1beta1/zz_generated.pculist.go | 17 ++ go.mod | 38 ++-- go.sum | 78 +++---- 11 files changed, 528 insertions(+), 218 deletions(-) create mode 100644 apis/actions/v1alpha1/zz_generated.resolvers.go create mode 100644 apis/repo/v1alpha1/zz_generated.resolvers.go create mode 100644 apis/team/v1alpha1/zz_generated.resolvers.go create mode 100644 apis/v1beta1/zz_generated.pc.go create mode 100644 apis/v1beta1/zz_generated.pcu.go create mode 100644 apis/v1beta1/zz_generated.pculist.go diff --git a/apis/actions/v1alpha1/zz_generated.managed.go b/apis/actions/v1alpha1/zz_generated.managed.go index 7769e97..e2c61a8 100644 --- a/apis/actions/v1alpha1/zz_generated.managed.go +++ b/apis/actions/v1alpha1/zz_generated.managed.go @@ -17,19 +17,16 @@ func (mg *ActionsSecret) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this ActionsSecret. +func (mg *ActionsSecret) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this ActionsSecret. func (mg *ActionsSecret) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this ActionsSecret. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *ActionsSecret) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this ActionsSecret. func (mg *ActionsSecret) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -50,19 +47,16 @@ func (mg *ActionsSecret) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this ActionsSecret. +func (mg *ActionsSecret) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this ActionsSecret. func (mg *ActionsSecret) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this ActionsSecret. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *ActionsSecret) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this ActionsSecret. func (mg *ActionsSecret) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/actions/v1alpha1/zz_generated.resolvers.go b/apis/actions/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..738ada2 --- /dev/null +++ b/apis/actions/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,40 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this ActionsSecret. +func (mg *ActionsSecret) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.RepositoryRef, + Selector: mg.Spec.ForProvider.RepositorySelector, + To: reference.To{ + List: &v1alpha1.RepositoryList{}, + Managed: &v1alpha1.Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Repository") + } + mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/repo/v1alpha1/zz_generated.managed.go b/apis/repo/v1alpha1/zz_generated.managed.go index a83a4bd..9a21a3e 100644 --- a/apis/repo/v1alpha1/zz_generated.managed.go +++ b/apis/repo/v1alpha1/zz_generated.managed.go @@ -17,19 +17,16 @@ func (mg *Branch) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this Branch. +func (mg *Branch) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this Branch. func (mg *Branch) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Branch. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Branch) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Branch. func (mg *Branch) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -50,19 +47,16 @@ func (mg *Branch) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this Branch. +func (mg *Branch) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this Branch. func (mg *Branch) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Branch. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Branch) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Branch. func (mg *Branch) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -83,19 +77,16 @@ func (mg *BranchProtection) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this BranchProtection. +func (mg *BranchProtection) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this BranchProtection. func (mg *BranchProtection) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this BranchProtection. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *BranchProtection) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this BranchProtection. func (mg *BranchProtection) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -116,19 +107,16 @@ func (mg *BranchProtection) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this BranchProtection. +func (mg *BranchProtection) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this BranchProtection. func (mg *BranchProtection) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this BranchProtection. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *BranchProtection) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this BranchProtection. func (mg *BranchProtection) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -149,19 +137,16 @@ func (mg *DefaultBranch) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this DefaultBranch. +func (mg *DefaultBranch) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this DefaultBranch. func (mg *DefaultBranch) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this DefaultBranch. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *DefaultBranch) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this DefaultBranch. func (mg *DefaultBranch) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -182,19 +167,16 @@ func (mg *DefaultBranch) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this DefaultBranch. +func (mg *DefaultBranch) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this DefaultBranch. func (mg *DefaultBranch) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this DefaultBranch. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *DefaultBranch) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this DefaultBranch. func (mg *DefaultBranch) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -215,19 +197,16 @@ func (mg *DeployKey) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this DeployKey. +func (mg *DeployKey) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this DeployKey. func (mg *DeployKey) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this DeployKey. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *DeployKey) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this DeployKey. func (mg *DeployKey) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -248,19 +227,16 @@ func (mg *DeployKey) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this DeployKey. +func (mg *DeployKey) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this DeployKey. func (mg *DeployKey) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this DeployKey. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *DeployKey) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this DeployKey. func (mg *DeployKey) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -281,19 +257,16 @@ func (mg *PullRequest) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this PullRequest. +func (mg *PullRequest) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this PullRequest. func (mg *PullRequest) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this PullRequest. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *PullRequest) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this PullRequest. func (mg *PullRequest) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -314,19 +287,16 @@ func (mg *PullRequest) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this PullRequest. +func (mg *PullRequest) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this PullRequest. func (mg *PullRequest) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this PullRequest. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *PullRequest) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this PullRequest. func (mg *PullRequest) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -347,19 +317,16 @@ func (mg *Repository) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this Repository. +func (mg *Repository) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this Repository. func (mg *Repository) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Repository. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Repository) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Repository. func (mg *Repository) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -380,19 +347,16 @@ func (mg *Repository) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this Repository. +func (mg *Repository) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this Repository. func (mg *Repository) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Repository. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Repository) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Repository. func (mg *Repository) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -413,19 +377,16 @@ func (mg *RepositoryFile) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this RepositoryFile. +func (mg *RepositoryFile) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this RepositoryFile. func (mg *RepositoryFile) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this RepositoryFile. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *RepositoryFile) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this RepositoryFile. func (mg *RepositoryFile) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -446,19 +407,16 @@ func (mg *RepositoryFile) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this RepositoryFile. +func (mg *RepositoryFile) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this RepositoryFile. func (mg *RepositoryFile) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this RepositoryFile. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *RepositoryFile) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this RepositoryFile. func (mg *RepositoryFile) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/repo/v1alpha1/zz_generated.resolvers.go b/apis/repo/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..f0ce74b --- /dev/null +++ b/apis/repo/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,201 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this Branch. +func (mg *Branch) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.RepositoryRef, + Selector: mg.Spec.ForProvider.RepositorySelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Repository") + } + mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this BranchProtection. +func (mg *BranchProtection) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.RepositoryID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.RepositoryIDRef, + Selector: mg.Spec.ForProvider.RepositoryIDSelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.RepositoryID") + } + mg.Spec.ForProvider.RepositoryID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RepositoryIDRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this DefaultBranch. +func (mg *DefaultBranch) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Branch), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.BranchRef, + Selector: mg.Spec.ForProvider.BranchSelector, + To: reference.To{ + List: &BranchList{}, + Managed: &Branch{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Branch") + } + mg.Spec.ForProvider.Branch = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.BranchRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this DeployKey. +func (mg *DeployKey) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.RepositoryRef, + Selector: mg.Spec.ForProvider.RepositorySelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Repository") + } + mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this PullRequest. +func (mg *PullRequest) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.BaseRepository), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.BaseRepositoryRef, + Selector: mg.Spec.ForProvider.BaseRepositorySelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.BaseRepository") + } + mg.Spec.ForProvider.BaseRepository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.BaseRepositoryRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.HeadRef), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.HeadRefRef, + Selector: mg.Spec.ForProvider.HeadRefSelector, + To: reference.To{ + List: &BranchList{}, + Managed: &Branch{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.HeadRef") + } + mg.Spec.ForProvider.HeadRef = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.HeadRefRef = rsp.ResolvedReference + + return nil +} + +// ResolveReferences of this RepositoryFile. +func (mg *RepositoryFile) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Branch), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.BranchRef, + Selector: mg.Spec.ForProvider.BranchSelector, + To: reference.To{ + List: &BranchList{}, + Managed: &Branch{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Branch") + } + mg.Spec.ForProvider.Branch = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.BranchRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.RepositoryRef, + Selector: mg.Spec.ForProvider.RepositorySelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Repository") + } + mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/team/v1alpha1/zz_generated.managed.go b/apis/team/v1alpha1/zz_generated.managed.go index ac4a568..e2bc438 100644 --- a/apis/team/v1alpha1/zz_generated.managed.go +++ b/apis/team/v1alpha1/zz_generated.managed.go @@ -17,19 +17,16 @@ func (mg *Team) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this Team. +func (mg *Team) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this Team. func (mg *Team) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this Team. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *Team) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this Team. func (mg *Team) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -50,19 +47,16 @@ func (mg *Team) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this Team. +func (mg *Team) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this Team. func (mg *Team) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this Team. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *Team) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this Team. func (mg *Team) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r @@ -83,19 +77,16 @@ func (mg *TeamRepository) GetDeletionPolicy() xpv1.DeletionPolicy { return mg.Spec.DeletionPolicy } +// GetManagementPolicies of this TeamRepository. +func (mg *TeamRepository) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + // GetProviderConfigReference of this TeamRepository. func (mg *TeamRepository) GetProviderConfigReference() *xpv1.Reference { return mg.Spec.ProviderConfigReference } -/* -GetProviderReference of this TeamRepository. -Deprecated: Use GetProviderConfigReference. -*/ -func (mg *TeamRepository) GetProviderReference() *xpv1.Reference { - return mg.Spec.ProviderReference -} - // GetPublishConnectionDetailsTo of this TeamRepository. func (mg *TeamRepository) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { return mg.Spec.PublishConnectionDetailsTo @@ -116,19 +107,16 @@ func (mg *TeamRepository) SetDeletionPolicy(r xpv1.DeletionPolicy) { mg.Spec.DeletionPolicy = r } +// SetManagementPolicies of this TeamRepository. +func (mg *TeamRepository) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + // SetProviderConfigReference of this TeamRepository. func (mg *TeamRepository) SetProviderConfigReference(r *xpv1.Reference) { mg.Spec.ProviderConfigReference = r } -/* -SetProviderReference of this TeamRepository. -Deprecated: Use SetProviderConfigReference. -*/ -func (mg *TeamRepository) SetProviderReference(r *xpv1.Reference) { - mg.Spec.ProviderReference = r -} - // SetPublishConnectionDetailsTo of this TeamRepository. func (mg *TeamRepository) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { mg.Spec.PublishConnectionDetailsTo = r diff --git a/apis/team/v1alpha1/zz_generated.resolvers.go b/apis/team/v1alpha1/zz_generated.resolvers.go new file mode 100644 index 0000000..78e19c6 --- /dev/null +++ b/apis/team/v1alpha1/zz_generated.resolvers.go @@ -0,0 +1,56 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "context" + v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" + reference "github.com/crossplane/crossplane-runtime/pkg/reference" + errors "github.com/pkg/errors" + client "sigs.k8s.io/controller-runtime/pkg/client" +) + +// ResolveReferences of this TeamRepository. +func (mg *TeamRepository) ResolveReferences(ctx context.Context, c client.Reader) error { + r := reference.NewAPIResolver(c, mg) + + var rsp reference.ResolutionResponse + var err error + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.RepositoryRef, + Selector: mg.Spec.ForProvider.RepositorySelector, + To: reference.To{ + List: &v1alpha1.RepositoryList{}, + Managed: &v1alpha1.Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.Repository") + } + mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.ForProvider.TeamID), + Extract: reference.ExternalName(), + Reference: mg.Spec.ForProvider.TeamIDRef, + Selector: mg.Spec.ForProvider.TeamIDSelector, + To: reference.To{ + List: &TeamList{}, + Managed: &Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.ForProvider.TeamID") + } + mg.Spec.ForProvider.TeamID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.ForProvider.TeamIDRef = rsp.ResolvedReference + + return nil +} diff --git a/apis/v1beta1/zz_generated.pc.go b/apis/v1beta1/zz_generated.pc.go new file mode 100644 index 0000000..c597006 --- /dev/null +++ b/apis/v1beta1/zz_generated.pc.go @@ -0,0 +1,28 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1beta1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this ProviderConfig. +func (p *ProviderConfig) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return p.Status.GetCondition(ct) +} + +// GetUsers of this ProviderConfig. +func (p *ProviderConfig) GetUsers() int64 { + return p.Status.Users +} + +// SetConditions of this ProviderConfig. +func (p *ProviderConfig) SetConditions(c ...xpv1.Condition) { + p.Status.SetConditions(c...) +} + +// SetUsers of this ProviderConfig. +func (p *ProviderConfig) SetUsers(i int64) { + p.Status.Users = i +} diff --git a/apis/v1beta1/zz_generated.pcu.go b/apis/v1beta1/zz_generated.pcu.go new file mode 100644 index 0000000..a4f4986 --- /dev/null +++ b/apis/v1beta1/zz_generated.pcu.go @@ -0,0 +1,28 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1beta1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetProviderConfigReference of this ProviderConfigUsage. +func (p *ProviderConfigUsage) GetProviderConfigReference() xpv1.Reference { + return p.ProviderConfigReference +} + +// GetResourceReference of this ProviderConfigUsage. +func (p *ProviderConfigUsage) GetResourceReference() xpv1.TypedReference { + return p.ResourceReference +} + +// SetProviderConfigReference of this ProviderConfigUsage. +func (p *ProviderConfigUsage) SetProviderConfigReference(r xpv1.Reference) { + p.ProviderConfigReference = r +} + +// SetResourceReference of this ProviderConfigUsage. +func (p *ProviderConfigUsage) SetResourceReference(r xpv1.TypedReference) { + p.ResourceReference = r +} diff --git a/apis/v1beta1/zz_generated.pculist.go b/apis/v1beta1/zz_generated.pculist.go new file mode 100644 index 0000000..b3ae1b4 --- /dev/null +++ b/apis/v1beta1/zz_generated.pculist.go @@ -0,0 +1,17 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1beta1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this ProviderConfigUsageList. +func (p *ProviderConfigUsageList) GetItems() []resource.ProviderConfigUsage { + items := make([]resource.ProviderConfigUsage, len(p.Items)) + for i := range p.Items { + items[i] = &p.Items[i] + } + return items +} diff --git a/go.mod b/go.mod index 3699046..d3b5dae 100644 --- a/go.mod +++ b/go.mod @@ -4,14 +4,14 @@ go 1.20 require ( dario.cat/mergo v1.0.0 - github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5 - github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e + github.com/crossplane/crossplane-runtime v1.14.1 + github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 github.com/crossplane/upjet v1.0.0 github.com/pkg/errors v0.9.1 gopkg.in/alecthomas/kingpin.v2 v2.2.6 - k8s.io/apimachinery v0.28.2 - k8s.io/client-go v0.28.2 - sigs.k8s.io/controller-runtime v0.16.2 + k8s.io/apimachinery v0.28.3 + k8s.io/client-go v0.28.3 + sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/controller-tools v0.13.0 ) @@ -26,7 +26,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/dave/jennifer v1.4.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/emicklei/go-restful/v3 v3.10.2 // indirect + github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/evanphx/json-patch/v5 v5.6.0 // indirect github.com/fatih/camelcase v1.0.0 // indirect github.com/fatih/color v1.15.0 // indirect @@ -44,7 +44,7 @@ require ( github.com/google/gnostic-models v0.6.8 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect - github.com/google/uuid v1.3.0 // indirect + github.com/google/uuid v1.3.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect github.com/hashicorp/go-hclog v1.2.1 // indirect @@ -92,26 +92,26 @@ require ( github.com/zclconf/go-cty-yaml v1.0.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/mod v0.12.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/oauth2 v0.10.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/mod v0.13.0 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/oauth2 v0.11.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect - golang.org/x/tools v0.13.0 // indirect + golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect - google.golang.org/grpc v1.58.3 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect + google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/api v0.28.2 // indirect - k8s.io/apiextensions-apiserver v0.28.2 // indirect - k8s.io/component-base v0.28.2 // indirect + k8s.io/api v0.28.3 // indirect + k8s.io/apiextensions-apiserver v0.28.3 // indirect + k8s.io/component-base v0.28.3 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect diff --git a/go.sum b/go.sum index 4b24358..6c1d28b 100644 --- a/go.sum +++ b/go.sum @@ -73,10 +73,10 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5 h1:K1Km6NCu9+VlZB3CmWSjrs09cDSbwQxJd2Qw2002dFs= -github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5/go.mod h1:kCS5576be8g++HhiDGEBUw+8nkW8p4jhURYeC0zx8jM= -github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e h1:HqLaMji3FRPwEBA5P6twPz0HbE6no0XOnByLU5O1noM= -github.com/crossplane/crossplane-tools v0.0.0-20220310165030-1f43fc12793e/go.mod h1:xFf30hwHd5n0/a0D4ZomId8nxQTTjE0Hc1j4/rWxefc= +github.com/crossplane/crossplane-runtime v1.14.1 h1:TCa7R1N4bDGHjsLhiRxR/mUhwmistlMACHm0kiiYKck= +github.com/crossplane/crossplane-runtime v1.14.1/go.mod h1:aOP+5W2wKpvthVs3pFNbVOe1jwrKYbJho0ThGNCVz9o= +github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= +github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= github.com/crossplane/upjet v1.0.0 h1:/R509m+c5XTLsd9oXTEaLj2yIbM/EUmG34XOou1dugM= github.com/crossplane/upjet v1.0.0/go.mod h1:t9etxIdYaxgyvFPBToikm5zBHi8RIpX8N4mTH77lQFM= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= @@ -84,8 +84,8 @@ github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpT 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/emicklei/go-restful/v3 v3.10.2 h1:hIovbnmBTLjHXkqEBUz3HGpXZdM7ZrE9fJIZIqlJLqE= -github.com/emicklei/go-restful/v3 v3.10.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.11.0 h1:rAQeMHw1c7zTmncogyy8VvRZwtkmkZ4FxERmMY4rD+g= +github.com/emicklei/go-restful/v3 v3.11.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -194,8 +194,8 @@ github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20230926050212-f7f687d19a98 h1:pUa4ghanp6q4IJHwE9RwLgmVFfReJN+KbQ8ExNEUUoQ= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.1 h1:KjJaJ9iWZ3jOFZIf1Lqf4laDRCasjl0BCmnEGxkdLb4= +github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= @@ -395,8 +395,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -421,8 +421,8 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -458,8 +458,8 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -469,8 +469,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.10.0 h1:zHCpF2Khkwy4mMB4bv0U37YtJdTGW8jI0glAApi0Kh8= -golang.org/x/oauth2 v0.10.0/go.mod h1:kTpgurOux7LqtuxjuyZa4Gj2gdezIt/jQtGnNFfypQI= +golang.org/x/oauth2 v0.11.0 h1:vPL4xzxBM4niKCW6g9whtaWVXTJf1U5e4aZxxFx/gbU= +golang.org/x/oauth2 v0.11.0/go.mod h1:LdF7O/8bLR/qWK9DrpXmbHLTouvRHK0SgJl0GmDBchk= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -482,7 +482,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -527,11 +527,11 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -599,8 +599,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -670,8 +670,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d h1:uvYuEyMHKNt+lT4K3bN6fGswmK8qSvcreM3BwjDh+y4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= @@ -688,8 +688,8 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -728,16 +728,16 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.28.2 h1:9mpl5mOb6vXZvqbQmankOfPIGiudghwCoLl1EYfUZbw= -k8s.io/api v0.28.2/go.mod h1:RVnJBsjU8tcMq7C3iaRSGMeaKt2TWEUXcpIt/90fjEg= -k8s.io/apiextensions-apiserver v0.28.2 h1:J6/QRWIKV2/HwBhHRVITMLYoypCoPY1ftigDM0Kn+QU= -k8s.io/apiextensions-apiserver v0.28.2/go.mod h1:5tnkxLGa9nefefYzWuAlWZ7RZYuN/765Au8cWLA6SRg= -k8s.io/apimachinery v0.28.2 h1:KCOJLrc6gu+wV1BYgwik4AF4vXOlVJPdiqn0yAWWwXQ= -k8s.io/apimachinery v0.28.2/go.mod h1:RdzF87y/ngqk9H4z3EL2Rppv5jj95vGS/HaFXrLDApU= -k8s.io/client-go v0.28.2 h1:DNoYI1vGq0slMBN/SWKMZMw0Rq+0EQW6/AK4v9+3VeY= -k8s.io/client-go v0.28.2/go.mod h1:sMkApowspLuc7omj1FOSUxSoqjr+d5Q0Yc0LOFnYFJY= -k8s.io/component-base v0.28.2 h1:Yc1yU+6AQSlpJZyvehm/NkJBII72rzlEsd6MkBQ+G0E= -k8s.io/component-base v0.28.2/go.mod h1:4IuQPQviQCg3du4si8GpMrhAIegxpsgPngPRR/zWpzc= +k8s.io/api v0.28.3 h1:Gj1HtbSdB4P08C8rs9AR94MfSGpRhJgsS+GF9V26xMM= +k8s.io/api v0.28.3/go.mod h1:MRCV/jr1dW87/qJnZ57U5Pak65LGmQVkKTzf3AtKFHc= +k8s.io/apiextensions-apiserver v0.28.3 h1:Od7DEnhXHnHPZG+W9I97/fSQkVpVPQx2diy+2EtmY08= +k8s.io/apiextensions-apiserver v0.28.3/go.mod h1:NE1XJZ4On0hS11aWWJUTNkmVB03j9LM7gJSisbRt8Lc= +k8s.io/apimachinery v0.28.3 h1:B1wYx8txOaCQG0HmYF6nbpU8dg6HvA06x5tEffvOe7A= +k8s.io/apimachinery v0.28.3/go.mod h1:uQTKmIqs+rAYaq+DFaoD2X7pcjLOqbQX2AOiO0nIpb8= +k8s.io/client-go v0.28.3 h1:2OqNb72ZuTZPKCl+4gTKvqao0AMOl9f3o2ijbAj3LI4= +k8s.io/client-go v0.28.3/go.mod h1:LTykbBp9gsA7SwqirlCXBWtK0guzfhpoW4qSm7i9dxo= +k8s.io/component-base v0.28.3 h1:rDy68eHKxq/80RiMb2Ld/tbH8uAE75JdCqJyi6lXMzI= +k8s.io/component-base v0.28.3/go.mod h1:fDJ6vpVNSk6cRo5wmDa6eKIG7UlIQkaFmZN2fYgIUD8= k8s.io/klog/v2 v2.100.1 h1:7WCHKK6K8fNhTqfBhISHQ97KrnJNFZMcQvKp7gP/tmg= k8s.io/klog/v2 v2.100.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 h1:LyMgNKD2P8Wn1iAwQU5OhxCKlKJy0sHc+PcDwFB24dQ= @@ -747,8 +747,8 @@ k8s.io/utils v0.0.0-20230726121419-3b25d923346b/go.mod h1:OLgZIPagt7ERELqWJFomSt rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/controller-runtime v0.16.2 h1:mwXAVuEk3EQf478PQwQ48zGOXvW27UJc8NHktQVuIPU= -sigs.k8s.io/controller-runtime v0.16.2/go.mod h1:vpMu3LpI5sYWtujJOa2uPK61nB5rbwlN7BAB8aSLvGU= +sigs.k8s.io/controller-runtime v0.16.3 h1:2TuvuokmfXvDUamSx1SuAOO3eTyye+47mJCigwG62c4= +sigs.k8s.io/controller-runtime v0.16.3/go.mod h1:j7bialYoSn142nv9sCOJmQgDXQXxnroFU4VnX/brVJ0= sigs.k8s.io/controller-tools v0.13.0 h1:NfrvuZ4bxyolhDBt/rCZhDnx3M2hzlhgo5n3Iv2RykI= sigs.k8s.io/controller-tools v0.13.0/go.mod h1:5vw3En2NazbejQGCeWKRrE7q4P+CW8/klfVqP8QZkgA= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= From f0c4f1c227f6e96ee36e51a48b28c824124aec95 Mon Sep 17 00:00:00 2001 From: Atze de Vries Date: Tue, 6 Feb 2024 10:08:59 +0100 Subject: [PATCH 4/7] update crossplane-tools and crossplane-runtime --- ...med.go => zz_actionssecret_terraformed.go} | 0 .../v1alpha1/zz_actionssecret_types.go | 15 +- .../v1alpha1/zz_generated.conversion_hubs.go | 14 + .../actions/v1alpha1/zz_generated.deepcopy.go | 15 + .../v1alpha1/zz_generated.resolvers.go | 16 + apis/repo/v1alpha1/zz_branch_terraformed.go | 133 +++ apis/repo/v1alpha1/zz_branch_types.go | 3 +- .../zz_branchprotection_terraformed.go | 133 +++ .../v1alpha1/zz_branchprotection_types.go | 28 +- .../v1alpha1/zz_defaultbranch_terraformed.go | 133 +++ apis/repo/v1alpha1/zz_defaultbranch_types.go | 15 +- .../repo/v1alpha1/zz_deploykey_terraformed.go | 133 +++ apis/repo/v1alpha1/zz_deploykey_types.go | 15 +- .../v1alpha1/zz_generated.conversion_hubs.go | 32 + apis/repo/v1alpha1/zz_generated.deepcopy.go | 107 ++- apis/repo/v1alpha1/zz_generated.resolvers.go | 112 +++ .../repo/v1alpha1/zz_generated_terraformed.go | 819 ------------------ .../v1alpha1/zz_pullrequest_terraformed.go | 133 +++ apis/repo/v1alpha1/zz_pullrequest_types.go | 27 +- .../v1alpha1/zz_repository_terraformed.go | 135 +++ apis/repo/v1alpha1/zz_repository_types.go | 6 +- .../v1alpha1/zz_repositoryfile_terraformed.go | 133 +++ apis/repo/v1alpha1/zz_repositoryfile_types.go | 30 +- .../v1alpha1/zz_generated.conversion_hubs.go | 17 + apis/team/v1alpha1/zz_generated.deepcopy.go | 30 + apis/team/v1alpha1/zz_generated.resolvers.go | 32 + apis/team/v1alpha1/zz_team_terraformed.go | 133 +++ apis/team/v1alpha1/zz_team_types.go | 3 +- ...ed.go => zz_teamrepository_terraformed.go} | 114 --- apis/team/v1alpha1/zz_teamrepository_types.go | 28 +- .../actions/{ => v1alpha1}/actionssecret.yaml | 0 .../repo/{ => v1alpha1}/branch.yaml | 0 .../repo/{ => v1alpha1}/branchprotection.yaml | 0 .../repo/{ => v1alpha1}/defaultbranch.yaml | 0 .../repo/{ => v1alpha1}/deploykey.yaml | 0 .../repo/{ => v1alpha1}/pullrequest.yaml | 0 .../repo/{ => v1alpha1}/repository.yaml | 0 .../repo/{ => v1alpha1}/repositoryfile.yaml | 0 .../team/{ => v1alpha1}/team.yaml | 0 .../team/{ => v1alpha1}/teamrepository.yaml | 0 go.mod | 34 +- go.sum | 75 +- .../actions/actionssecret/zz_controller.go | 12 + .../controller/repo/branch/zz_controller.go | 12 + .../repo/branchprotection/zz_controller.go | 12 + .../repo/defaultbranch/zz_controller.go | 12 + .../repo/deploykey/zz_controller.go | 12 + .../repo/pullrequest/zz_controller.go | 12 + .../repo/repository/zz_controller.go | 12 + .../repo/repositoryfile/zz_controller.go | 12 + .../controller/team/team/zz_controller.go | 12 + .../team/teamrepository/zz_controller.go | 12 + ...ns.template.upbound.io_actionssecrets.yaml | 76 ++ ...template.upbound.io_branchprotections.yaml | 89 ++ ...o.template.upbound.io_defaultbranches.yaml | 77 ++ .../repo.template.upbound.io_deploykeys.yaml | 76 ++ ...repo.template.upbound.io_pullrequests.yaml | 154 ++++ ...repo.template.upbound.io_repositories.yaml | 3 + ...o.template.upbound.io_repositoryfiles.yaml | 155 ++++ ....template.upbound.io_teamrepositories.yaml | 153 ++++ 60 files changed, 2563 insertions(+), 993 deletions(-) rename apis/actions/v1alpha1/{zz_generated_terraformed.go => zz_actionssecret_terraformed.go} (100%) create mode 100755 apis/actions/v1alpha1/zz_generated.conversion_hubs.go create mode 100755 apis/repo/v1alpha1/zz_branch_terraformed.go create mode 100755 apis/repo/v1alpha1/zz_branchprotection_terraformed.go create mode 100755 apis/repo/v1alpha1/zz_defaultbranch_terraformed.go create mode 100755 apis/repo/v1alpha1/zz_deploykey_terraformed.go create mode 100755 apis/repo/v1alpha1/zz_generated.conversion_hubs.go delete mode 100755 apis/repo/v1alpha1/zz_generated_terraformed.go create mode 100755 apis/repo/v1alpha1/zz_pullrequest_terraformed.go create mode 100755 apis/repo/v1alpha1/zz_repository_terraformed.go create mode 100755 apis/repo/v1alpha1/zz_repositoryfile_terraformed.go create mode 100755 apis/team/v1alpha1/zz_generated.conversion_hubs.go create mode 100755 apis/team/v1alpha1/zz_team_terraformed.go rename apis/team/v1alpha1/{zz_generated_terraformed.go => zz_teamrepository_terraformed.go} (53%) rename examples-generated/actions/{ => v1alpha1}/actionssecret.yaml (100%) rename examples-generated/repo/{ => v1alpha1}/branch.yaml (100%) rename examples-generated/repo/{ => v1alpha1}/branchprotection.yaml (100%) rename examples-generated/repo/{ => v1alpha1}/defaultbranch.yaml (100%) rename examples-generated/repo/{ => v1alpha1}/deploykey.yaml (100%) rename examples-generated/repo/{ => v1alpha1}/pullrequest.yaml (100%) rename examples-generated/repo/{ => v1alpha1}/repository.yaml (100%) rename examples-generated/repo/{ => v1alpha1}/repositoryfile.yaml (100%) rename examples-generated/team/{ => v1alpha1}/team.yaml (100%) rename examples-generated/team/{ => v1alpha1}/teamrepository.yaml (100%) diff --git a/apis/actions/v1alpha1/zz_generated_terraformed.go b/apis/actions/v1alpha1/zz_actionssecret_terraformed.go similarity index 100% rename from apis/actions/v1alpha1/zz_generated_terraformed.go rename to apis/actions/v1alpha1/zz_actionssecret_terraformed.go diff --git a/apis/actions/v1alpha1/zz_actionssecret_types.go b/apis/actions/v1alpha1/zz_actionssecret_types.go index 5949816..f0f55d0 100755 --- a/apis/actions/v1alpha1/zz_actionssecret_types.go +++ b/apis/actions/v1alpha1/zz_actionssecret_types.go @@ -19,6 +19,18 @@ import ( type ActionsSecretInitParameters struct { + // Name of the repository + // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Repository + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + + // Reference to a Repository in repo to populate repository. + // +kubebuilder:validation:Optional + RepositoryRef *v1.Reference `json:"repositoryRef,omitempty" tf:"-"` + + // Selector for a Repository in repo to populate repository. + // +kubebuilder:validation:Optional + RepositorySelector *v1.Selector `json:"repositorySelector,omitempty" tf:"-"` + // Name of the secret SecretName *string `json:"secretName,omitempty" tf:"secret_name,omitempty"` } @@ -92,13 +104,14 @@ type ActionsSecretStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // ActionsSecret is the Schema for the ActionsSecrets API. Creates and manages an Action Secret within a GitHub repository // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type ActionsSecret struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/actions/v1alpha1/zz_generated.conversion_hubs.go b/apis/actions/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..5b4206e --- /dev/null +++ b/apis/actions/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,14 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *ActionsSecret) Hub() {} diff --git a/apis/actions/v1alpha1/zz_generated.deepcopy.go b/apis/actions/v1alpha1/zz_generated.deepcopy.go index 55f81cd..afa881c 100644 --- a/apis/actions/v1alpha1/zz_generated.deepcopy.go +++ b/apis/actions/v1alpha1/zz_generated.deepcopy.go @@ -43,6 +43,21 @@ func (in *ActionsSecret) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ActionsSecretInitParameters) DeepCopyInto(out *ActionsSecretInitParameters) { *out = *in + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.RepositoryRef != nil { + in, out := &in.RepositoryRef, &out.RepositoryRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RepositorySelector != nil { + in, out := &in.RepositorySelector, &out.RepositorySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.SecretName != nil { in, out := &in.SecretName, &out.SecretName *out = new(string) diff --git a/apis/actions/v1alpha1/zz_generated.resolvers.go b/apis/actions/v1alpha1/zz_generated.resolvers.go index 738ada2..fd4fa50 100644 --- a/apis/actions/v1alpha1/zz_generated.resolvers.go +++ b/apis/actions/v1alpha1/zz_generated.resolvers.go @@ -36,5 +36,21 @@ func (mg *ActionsSecret) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.RepositoryRef, + Selector: mg.Spec.InitProvider.RepositorySelector, + To: reference.To{ + List: &v1alpha1.RepositoryList{}, + Managed: &v1alpha1.Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Repository") + } + mg.Spec.InitProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.RepositoryRef = rsp.ResolvedReference + return nil } diff --git a/apis/repo/v1alpha1/zz_branch_terraformed.go b/apis/repo/v1alpha1/zz_branch_terraformed.go new file mode 100755 index 0000000..4453aee --- /dev/null +++ b/apis/repo/v1alpha1/zz_branch_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Branch +func (mg *Branch) GetTerraformResourceType() string { + return "github_branch" +} + +// GetConnectionDetailsMapping for this Branch +func (tr *Branch) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Branch +func (tr *Branch) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Branch +func (tr *Branch) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Branch +func (tr *Branch) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Branch +func (tr *Branch) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Branch +func (tr *Branch) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Branch +func (tr *Branch) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Branch +func (tr *Branch) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Branch using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Branch) LateInitialize(attrs []byte) (bool, error) { + params := &BranchParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Branch) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/repo/v1alpha1/zz_branch_types.go b/apis/repo/v1alpha1/zz_branch_types.go index 21e3535..3919a1d 100755 --- a/apis/repo/v1alpha1/zz_branch_types.go +++ b/apis/repo/v1alpha1/zz_branch_types.go @@ -94,13 +94,14 @@ type BranchStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Branch is the Schema for the Branchs API. Creates and manages branches within GitHub repositories. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type Branch struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/repo/v1alpha1/zz_branchprotection_terraformed.go b/apis/repo/v1alpha1/zz_branchprotection_terraformed.go new file mode 100755 index 0000000..5fae7c2 --- /dev/null +++ b/apis/repo/v1alpha1/zz_branchprotection_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this BranchProtection +func (mg *BranchProtection) GetTerraformResourceType() string { + return "github_branch_protection" +} + +// GetConnectionDetailsMapping for this BranchProtection +func (tr *BranchProtection) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this BranchProtection +func (tr *BranchProtection) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this BranchProtection +func (tr *BranchProtection) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this BranchProtection +func (tr *BranchProtection) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this BranchProtection +func (tr *BranchProtection) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this BranchProtection +func (tr *BranchProtection) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this BranchProtection +func (tr *BranchProtection) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this BranchProtection +func (tr *BranchProtection) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this BranchProtection using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *BranchProtection) LateInitialize(attrs []byte) (bool, error) { + params := &BranchProtectionParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *BranchProtection) GetTerraformSchemaVersion() int { + return 1 +} diff --git a/apis/repo/v1alpha1/zz_branchprotection_types.go b/apis/repo/v1alpha1/zz_branchprotection_types.go index a9fd23c..ba496cc 100755 --- a/apis/repo/v1alpha1/zz_branchprotection_types.go +++ b/apis/repo/v1alpha1/zz_branchprotection_types.go @@ -38,8 +38,22 @@ type BranchProtectionInitParameters struct { Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"` // The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + // +listType=set PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"` + // The name or node ID of the repository associated with this branch protection rule. + // Node ID or name of repository + // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Repository + RepositoryID *string `json:"repositoryId,omitempty" tf:"repository_id,omitempty"` + + // Reference to a Repository in repo to populate repositoryId. + // +kubebuilder:validation:Optional + RepositoryIDRef *v1.Reference `json:"repositoryIdRef,omitempty" tf:"-"` + + // Selector for a Repository in repo to populate repositoryId. + // +kubebuilder:validation:Optional + RepositoryIDSelector *v1.Selector `json:"repositoryIdSelector,omitempty" tf:"-"` + // Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged. RequireConversationResolution *bool `json:"requireConversationResolution,omitempty" tf:"require_conversation_resolution,omitempty"` @@ -79,6 +93,7 @@ type BranchProtectionObservation struct { Pattern *string `json:"pattern,omitempty" tf:"pattern,omitempty"` // The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + // +listType=set PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"` // The name or node ID of the repository associated with this branch protection rule. @@ -129,6 +144,7 @@ type BranchProtectionParameters struct { // The list of actor Names/IDs that may push to the branch. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. // +kubebuilder:validation:Optional + // +listType=set PushRestrictions []*string `json:"pushRestrictions,omitempty" tf:"push_restrictions,omitempty"` // The name or node ID of the repository associated with this branch protection rule. @@ -172,9 +188,11 @@ type RequiredPullRequestReviewsInitParameters struct { DismissStaleReviews *bool `json:"dismissStaleReviews,omitempty" tf:"dismiss_stale_reviews,omitempty"` // : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + // +listType=set DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"` // : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + // +listType=set PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"` // : Require an approved review in pull requests including files with a designated code owner. Defaults to false. @@ -197,9 +215,11 @@ type RequiredPullRequestReviewsObservation struct { DismissStaleReviews *bool `json:"dismissStaleReviews,omitempty" tf:"dismiss_stale_reviews,omitempty"` // : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + // +listType=set DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"` // : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. + // +listType=set PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"` // : Require an approved review in pull requests including files with a designated code owner. Defaults to false. @@ -224,10 +244,12 @@ type RequiredPullRequestReviewsParameters struct { // : The list of actor Names/IDs with dismissal access. If not empty, restrict_dismissals is ignored. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. // +kubebuilder:validation:Optional + // +listType=set DismissalRestrictions []*string `json:"dismissalRestrictions,omitempty" tf:"dismissal_restrictions,omitempty"` // : The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must either begin with a "/" for users or the organization name followed by a "/" for teams. // +kubebuilder:validation:Optional + // +listType=set PullRequestBypassers []*string `json:"pullRequestBypassers,omitempty" tf:"pull_request_bypassers,omitempty"` // : Require an approved review in pull requests including files with a designated code owner. Defaults to false. @@ -251,6 +273,7 @@ type RequiredPullRequestReviewsParameters struct { type RequiredStatusChecksInitParameters struct { // : The list of status checks to require in order to merge into this branch. No status checks are required by default. + // +listType=set Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"` // : Require branches to be up to date before merging. Defaults to false. @@ -260,6 +283,7 @@ type RequiredStatusChecksInitParameters struct { type RequiredStatusChecksObservation struct { // : The list of status checks to require in order to merge into this branch. No status checks are required by default. + // +listType=set Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"` // : Require branches to be up to date before merging. Defaults to false. @@ -270,6 +294,7 @@ type RequiredStatusChecksParameters struct { // : The list of status checks to require in order to merge into this branch. No status checks are required by default. // +kubebuilder:validation:Optional + // +listType=set Contexts []*string `json:"contexts,omitempty" tf:"contexts,omitempty"` // : Require branches to be up to date before merging. Defaults to false. @@ -301,13 +326,14 @@ type BranchProtectionStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // BranchProtection is the Schema for the BranchProtections API. Protects a GitHub branch. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type BranchProtection struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/repo/v1alpha1/zz_defaultbranch_terraformed.go b/apis/repo/v1alpha1/zz_defaultbranch_terraformed.go new file mode 100755 index 0000000..728ed00 --- /dev/null +++ b/apis/repo/v1alpha1/zz_defaultbranch_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this DefaultBranch +func (mg *DefaultBranch) GetTerraformResourceType() string { + return "github_branch_default" +} + +// GetConnectionDetailsMapping for this DefaultBranch +func (tr *DefaultBranch) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this DefaultBranch +func (tr *DefaultBranch) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this DefaultBranch +func (tr *DefaultBranch) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this DefaultBranch +func (tr *DefaultBranch) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this DefaultBranch +func (tr *DefaultBranch) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this DefaultBranch +func (tr *DefaultBranch) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this DefaultBranch +func (tr *DefaultBranch) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DefaultBranch +func (tr *DefaultBranch) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this DefaultBranch using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *DefaultBranch) LateInitialize(attrs []byte) (bool, error) { + params := &DefaultBranchParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *DefaultBranch) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/repo/v1alpha1/zz_defaultbranch_types.go b/apis/repo/v1alpha1/zz_defaultbranch_types.go index b79bd1b..7857965 100755 --- a/apis/repo/v1alpha1/zz_defaultbranch_types.go +++ b/apis/repo/v1alpha1/zz_defaultbranch_types.go @@ -18,6 +18,18 @@ import ( ) type DefaultBranchInitParameters struct { + + // The branch (e.g. main) + // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Branch + Branch *string `json:"branch,omitempty" tf:"branch,omitempty"` + + // Reference to a Branch in repo to populate branch. + // +kubebuilder:validation:Optional + BranchRef *v1.Reference `json:"branchRef,omitempty" tf:"-"` + + // Selector for a Branch in repo to populate branch. + // +kubebuilder:validation:Optional + BranchSelector *v1.Selector `json:"branchSelector,omitempty" tf:"-"` } type DefaultBranchObservation struct { @@ -68,13 +80,14 @@ type DefaultBranchStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // DefaultBranch is the Schema for the DefaultBranchs API. Provides a GitHub branch default for a given repository. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type DefaultBranch struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/repo/v1alpha1/zz_deploykey_terraformed.go b/apis/repo/v1alpha1/zz_deploykey_terraformed.go new file mode 100755 index 0000000..46cf58f --- /dev/null +++ b/apis/repo/v1alpha1/zz_deploykey_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this DeployKey +func (mg *DeployKey) GetTerraformResourceType() string { + return "github_repository_deploy_key" +} + +// GetConnectionDetailsMapping for this DeployKey +func (tr *DeployKey) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this DeployKey +func (tr *DeployKey) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this DeployKey +func (tr *DeployKey) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this DeployKey +func (tr *DeployKey) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this DeployKey +func (tr *DeployKey) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this DeployKey +func (tr *DeployKey) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this DeployKey +func (tr *DeployKey) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this DeployKey +func (tr *DeployKey) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this DeployKey using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *DeployKey) LateInitialize(attrs []byte) (bool, error) { + params := &DeployKeyParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *DeployKey) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/repo/v1alpha1/zz_deploykey_types.go b/apis/repo/v1alpha1/zz_deploykey_types.go index 342101a..1021f47 100755 --- a/apis/repo/v1alpha1/zz_deploykey_types.go +++ b/apis/repo/v1alpha1/zz_deploykey_types.go @@ -25,6 +25,18 @@ type DeployKeyInitParameters struct { // A boolean qualifying the key to be either read only or read/write. ReadOnly *bool `json:"readOnly,omitempty" tf:"read_only,omitempty"` + // Name of the GitHub repository. + // +crossplane:generate:reference:type=Repository + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + + // Reference to a Repository to populate repository. + // +kubebuilder:validation:Optional + RepositoryRef *v1.Reference `json:"repositoryRef,omitempty" tf:"-"` + + // Selector for a Repository to populate repository. + // +kubebuilder:validation:Optional + RepositorySelector *v1.Selector `json:"repositorySelector,omitempty" tf:"-"` + // A title. Title *string `json:"title,omitempty" tf:"title,omitempty"` } @@ -99,13 +111,14 @@ type DeployKeyStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // DeployKey is the Schema for the DeployKeys API. Provides a GitHub repository deploy key resource. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type DeployKey struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/repo/v1alpha1/zz_generated.conversion_hubs.go b/apis/repo/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..51a3153 --- /dev/null +++ b/apis/repo/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,32 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Branch) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *DefaultBranch) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *BranchProtection) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *Repository) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *DeployKey) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *RepositoryFile) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *PullRequest) Hub() {} diff --git a/apis/repo/v1alpha1/zz_generated.deepcopy.go b/apis/repo/v1alpha1/zz_generated.deepcopy.go index 0a8b8f4..90b3e9a 100644 --- a/apis/repo/v1alpha1/zz_generated.deepcopy.go +++ b/apis/repo/v1alpha1/zz_generated.deepcopy.go @@ -313,6 +313,21 @@ func (in *BranchProtectionInitParameters) DeepCopyInto(out *BranchProtectionInit } } } + if in.RepositoryID != nil { + in, out := &in.RepositoryID, &out.RepositoryID + *out = new(string) + **out = **in + } + if in.RepositoryIDRef != nil { + in, out := &in.RepositoryIDRef, &out.RepositoryIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RepositoryIDSelector != nil { + in, out := &in.RepositoryIDSelector, &out.RepositoryIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.RequireConversationResolution != nil { in, out := &in.RequireConversationResolution, &out.RequireConversationResolution *out = new(bool) @@ -681,6 +696,21 @@ func (in *DefaultBranch) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *DefaultBranchInitParameters) DeepCopyInto(out *DefaultBranchInitParameters) { *out = *in + if in.Branch != nil { + in, out := &in.Branch, &out.Branch + *out = new(string) + **out = **in + } + if in.BranchRef != nil { + in, out := &in.BranchRef, &out.BranchRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.BranchSelector != nil { + in, out := &in.BranchSelector, &out.BranchSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultBranchInitParameters. @@ -785,7 +815,7 @@ func (in *DefaultBranchSpec) DeepCopyInto(out *DefaultBranchSpec) { *out = *in in.ResourceSpec.DeepCopyInto(&out.ResourceSpec) in.ForProvider.DeepCopyInto(&out.ForProvider) - out.InitProvider = in.InitProvider + in.InitProvider.DeepCopyInto(&out.InitProvider) } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultBranchSpec. @@ -855,6 +885,21 @@ func (in *DeployKeyInitParameters) DeepCopyInto(out *DeployKeyInitParameters) { *out = new(bool) **out = **in } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.RepositoryRef != nil { + in, out := &in.RepositoryRef, &out.RepositoryRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RepositorySelector != nil { + in, out := &in.RepositorySelector, &out.RepositorySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Title != nil { in, out := &in.Title, &out.Title *out = new(string) @@ -1165,11 +1210,41 @@ func (in *PullRequestInitParameters) DeepCopyInto(out *PullRequestInitParameters *out = new(string) **out = **in } + if in.BaseRepository != nil { + in, out := &in.BaseRepository, &out.BaseRepository + *out = new(string) + **out = **in + } + if in.BaseRepositoryRef != nil { + in, out := &in.BaseRepositoryRef, &out.BaseRepositoryRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.BaseRepositorySelector != nil { + in, out := &in.BaseRepositorySelector, &out.BaseRepositorySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.Body != nil { in, out := &in.Body, &out.Body *out = new(string) **out = **in } + if in.HeadRef != nil { + in, out := &in.HeadRef, &out.HeadRef + *out = new(string) + **out = **in + } + if in.HeadRefRef != nil { + in, out := &in.HeadRefRef, &out.HeadRefRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.HeadRefSelector != nil { + in, out := &in.HeadRefSelector, &out.HeadRefSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.MaintainerCanModify != nil { in, out := &in.MaintainerCanModify, &out.MaintainerCanModify *out = new(bool) @@ -1497,6 +1572,21 @@ func (in *RepositoryFile) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RepositoryFileInitParameters) DeepCopyInto(out *RepositoryFileInitParameters) { *out = *in + if in.Branch != nil { + in, out := &in.Branch, &out.Branch + *out = new(string) + **out = **in + } + if in.BranchRef != nil { + in, out := &in.BranchRef, &out.BranchRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.BranchSelector != nil { + in, out := &in.BranchSelector, &out.BranchSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } if in.CommitAuthor != nil { in, out := &in.CommitAuthor, &out.CommitAuthor *out = new(string) @@ -1527,6 +1617,21 @@ func (in *RepositoryFileInitParameters) DeepCopyInto(out *RepositoryFileInitPara *out = new(bool) **out = **in } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.RepositoryRef != nil { + in, out := &in.RepositoryRef, &out.RepositoryRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RepositorySelector != nil { + in, out := &in.RepositorySelector, &out.RepositorySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryFileInitParameters. diff --git a/apis/repo/v1alpha1/zz_generated.resolvers.go b/apis/repo/v1alpha1/zz_generated.resolvers.go index f0ce74b..9905767 100644 --- a/apis/repo/v1alpha1/zz_generated.resolvers.go +++ b/apis/repo/v1alpha1/zz_generated.resolvers.go @@ -61,6 +61,22 @@ func (mg *BranchProtection) ResolveReferences(ctx context.Context, c client.Read mg.Spec.ForProvider.RepositoryID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RepositoryIDRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.RepositoryID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.RepositoryIDRef, + Selector: mg.Spec.InitProvider.RepositoryIDSelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.RepositoryID") + } + mg.Spec.InitProvider.RepositoryID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.RepositoryIDRef = rsp.ResolvedReference + return nil } @@ -87,6 +103,22 @@ func (mg *DefaultBranch) ResolveReferences(ctx context.Context, c client.Reader) mg.Spec.ForProvider.Branch = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.BranchRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Branch), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.BranchRef, + Selector: mg.Spec.InitProvider.BranchSelector, + To: reference.To{ + List: &BranchList{}, + Managed: &Branch{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Branch") + } + mg.Spec.InitProvider.Branch = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.BranchRef = rsp.ResolvedReference + return nil } @@ -113,6 +145,22 @@ func (mg *DeployKey) ResolveReferences(ctx context.Context, c client.Reader) err mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.RepositoryRef, + Selector: mg.Spec.InitProvider.RepositorySelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Repository") + } + mg.Spec.InitProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.RepositoryRef = rsp.ResolvedReference + return nil } @@ -155,6 +203,38 @@ func (mg *PullRequest) ResolveReferences(ctx context.Context, c client.Reader) e mg.Spec.ForProvider.HeadRef = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.HeadRefRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.BaseRepository), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.BaseRepositoryRef, + Selector: mg.Spec.InitProvider.BaseRepositorySelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.BaseRepository") + } + mg.Spec.InitProvider.BaseRepository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.BaseRepositoryRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.HeadRef), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.HeadRefRef, + Selector: mg.Spec.InitProvider.HeadRefSelector, + To: reference.To{ + List: &BranchList{}, + Managed: &Branch{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.HeadRef") + } + mg.Spec.InitProvider.HeadRef = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.HeadRefRef = rsp.ResolvedReference + return nil } @@ -197,5 +277,37 @@ func (mg *RepositoryFile) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.RepositoryRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Branch), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.BranchRef, + Selector: mg.Spec.InitProvider.BranchSelector, + To: reference.To{ + List: &BranchList{}, + Managed: &Branch{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Branch") + } + mg.Spec.InitProvider.Branch = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.BranchRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.RepositoryRef, + Selector: mg.Spec.InitProvider.RepositorySelector, + To: reference.To{ + List: &RepositoryList{}, + Managed: &Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Repository") + } + mg.Spec.InitProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.RepositoryRef = rsp.ResolvedReference + return nil } diff --git a/apis/repo/v1alpha1/zz_generated_terraformed.go b/apis/repo/v1alpha1/zz_generated_terraformed.go deleted file mode 100755 index 46d9848..0000000 --- a/apis/repo/v1alpha1/zz_generated_terraformed.go +++ /dev/null @@ -1,819 +0,0 @@ -// SPDX-FileCopyrightText: 2023 The Crossplane Authors -// -// SPDX-License-Identifier: Apache-2.0 - -/* -Copyright 2022 Upbound Inc. -*/ - -// Code generated by upjet. DO NOT EDIT. - -package v1alpha1 - -import ( - "dario.cat/mergo" - "github.com/pkg/errors" - - "github.com/crossplane/upjet/pkg/resource" - "github.com/crossplane/upjet/pkg/resource/json" -) - -// GetTerraformResourceType returns Terraform resource type for this Branch -func (mg *Branch) GetTerraformResourceType() string { - return "github_branch" -} - -// GetConnectionDetailsMapping for this Branch -func (tr *Branch) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Branch -func (tr *Branch) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Branch -func (tr *Branch) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Branch -func (tr *Branch) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Branch -func (tr *Branch) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Branch -func (tr *Branch) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Branch -func (tr *Branch) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this Branch -func (tr *Branch) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this Branch using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Branch) LateInitialize(attrs []byte) (bool, error) { - params := &BranchParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Branch) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this DefaultBranch -func (mg *DefaultBranch) GetTerraformResourceType() string { - return "github_branch_default" -} - -// GetConnectionDetailsMapping for this DefaultBranch -func (tr *DefaultBranch) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this DefaultBranch -func (tr *DefaultBranch) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this DefaultBranch -func (tr *DefaultBranch) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this DefaultBranch -func (tr *DefaultBranch) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this DefaultBranch -func (tr *DefaultBranch) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this DefaultBranch -func (tr *DefaultBranch) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this DefaultBranch -func (tr *DefaultBranch) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this DefaultBranch -func (tr *DefaultBranch) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this DefaultBranch using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *DefaultBranch) LateInitialize(attrs []byte) (bool, error) { - params := &DefaultBranchParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *DefaultBranch) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this BranchProtection -func (mg *BranchProtection) GetTerraformResourceType() string { - return "github_branch_protection" -} - -// GetConnectionDetailsMapping for this BranchProtection -func (tr *BranchProtection) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this BranchProtection -func (tr *BranchProtection) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this BranchProtection -func (tr *BranchProtection) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this BranchProtection -func (tr *BranchProtection) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this BranchProtection -func (tr *BranchProtection) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this BranchProtection -func (tr *BranchProtection) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this BranchProtection -func (tr *BranchProtection) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this BranchProtection -func (tr *BranchProtection) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this BranchProtection using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *BranchProtection) LateInitialize(attrs []byte) (bool, error) { - params := &BranchProtectionParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *BranchProtection) GetTerraformSchemaVersion() int { - return 1 -} - -// GetTerraformResourceType returns Terraform resource type for this Repository -func (mg *Repository) GetTerraformResourceType() string { - return "github_repository" -} - -// GetConnectionDetailsMapping for this Repository -func (tr *Repository) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Repository -func (tr *Repository) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Repository -func (tr *Repository) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Repository -func (tr *Repository) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Repository -func (tr *Repository) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Repository -func (tr *Repository) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Repository -func (tr *Repository) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this Repository -func (tr *Repository) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this Repository using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Repository) LateInitialize(attrs []byte) (bool, error) { - params := &RepositoryParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - opts = append(opts, resource.WithNameFilter("DefaultBranch")) - opts = append(opts, resource.WithNameFilter("Private")) - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Repository) GetTerraformSchemaVersion() int { - return 1 -} - -// GetTerraformResourceType returns Terraform resource type for this DeployKey -func (mg *DeployKey) GetTerraformResourceType() string { - return "github_repository_deploy_key" -} - -// GetConnectionDetailsMapping for this DeployKey -func (tr *DeployKey) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this DeployKey -func (tr *DeployKey) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this DeployKey -func (tr *DeployKey) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this DeployKey -func (tr *DeployKey) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this DeployKey -func (tr *DeployKey) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this DeployKey -func (tr *DeployKey) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this DeployKey -func (tr *DeployKey) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this DeployKey -func (tr *DeployKey) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this DeployKey using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *DeployKey) LateInitialize(attrs []byte) (bool, error) { - params := &DeployKeyParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *DeployKey) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this RepositoryFile -func (mg *RepositoryFile) GetTerraformResourceType() string { - return "github_repository_file" -} - -// GetConnectionDetailsMapping for this RepositoryFile -func (tr *RepositoryFile) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this RepositoryFile -func (tr *RepositoryFile) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this RepositoryFile -func (tr *RepositoryFile) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this RepositoryFile -func (tr *RepositoryFile) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this RepositoryFile -func (tr *RepositoryFile) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this RepositoryFile -func (tr *RepositoryFile) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this RepositoryFile -func (tr *RepositoryFile) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this RepositoryFile -func (tr *RepositoryFile) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this RepositoryFile using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *RepositoryFile) LateInitialize(attrs []byte) (bool, error) { - params := &RepositoryFileParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *RepositoryFile) GetTerraformSchemaVersion() int { - return 0 -} - -// GetTerraformResourceType returns Terraform resource type for this PullRequest -func (mg *PullRequest) GetTerraformResourceType() string { - return "github_repository_pull_request" -} - -// GetConnectionDetailsMapping for this PullRequest -func (tr *PullRequest) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this PullRequest -func (tr *PullRequest) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this PullRequest -func (tr *PullRequest) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this PullRequest -func (tr *PullRequest) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this PullRequest -func (tr *PullRequest) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this PullRequest -func (tr *PullRequest) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this PullRequest -func (tr *PullRequest) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this PullRequest -func (tr *PullRequest) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this PullRequest using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *PullRequest) LateInitialize(attrs []byte) (bool, error) { - params := &PullRequestParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *PullRequest) GetTerraformSchemaVersion() int { - return 0 -} diff --git a/apis/repo/v1alpha1/zz_pullrequest_terraformed.go b/apis/repo/v1alpha1/zz_pullrequest_terraformed.go new file mode 100755 index 0000000..78f629a --- /dev/null +++ b/apis/repo/v1alpha1/zz_pullrequest_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this PullRequest +func (mg *PullRequest) GetTerraformResourceType() string { + return "github_repository_pull_request" +} + +// GetConnectionDetailsMapping for this PullRequest +func (tr *PullRequest) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this PullRequest +func (tr *PullRequest) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this PullRequest +func (tr *PullRequest) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this PullRequest +func (tr *PullRequest) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this PullRequest +func (tr *PullRequest) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this PullRequest +func (tr *PullRequest) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this PullRequest +func (tr *PullRequest) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this PullRequest +func (tr *PullRequest) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this PullRequest using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *PullRequest) LateInitialize(attrs []byte) (bool, error) { + params := &PullRequestParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *PullRequest) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/repo/v1alpha1/zz_pullrequest_types.go b/apis/repo/v1alpha1/zz_pullrequest_types.go index 63cb8d5..f0ee967 100755 --- a/apis/repo/v1alpha1/zz_pullrequest_types.go +++ b/apis/repo/v1alpha1/zz_pullrequest_types.go @@ -22,9 +22,33 @@ type PullRequestInitParameters struct { // Name of the branch serving as the base of the Pull Request. BaseRef *string `json:"baseRef,omitempty" tf:"base_ref,omitempty"` + // Name of the base repository to retrieve the Pull Requests from. + // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Repository + BaseRepository *string `json:"baseRepository,omitempty" tf:"base_repository,omitempty"` + + // Reference to a Repository in repo to populate baseRepository. + // +kubebuilder:validation:Optional + BaseRepositoryRef *v1.Reference `json:"baseRepositoryRef,omitempty" tf:"-"` + + // Selector for a Repository in repo to populate baseRepository. + // +kubebuilder:validation:Optional + BaseRepositorySelector *v1.Selector `json:"baseRepositorySelector,omitempty" tf:"-"` + // Body of the Pull Request. Body *string `json:"body,omitempty" tf:"body,omitempty"` + // Name of the branch serving as the head of the Pull Request. + // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Branch + HeadRef *string `json:"headRef,omitempty" tf:"head_ref,omitempty"` + + // Reference to a Branch in repo to populate headRef. + // +kubebuilder:validation:Optional + HeadRefRef *v1.Reference `json:"headRefRef,omitempty" tf:"-"` + + // Selector for a Branch in repo to populate headRef. + // +kubebuilder:validation:Optional + HeadRefSelector *v1.Selector `json:"headRefSelector,omitempty" tf:"-"` + // Controls whether the base repository maintainers can modify the Pull Request. Default: false. MaintainerCanModify *bool `json:"maintainerCanModify,omitempty" tf:"maintainer_can_modify,omitempty"` @@ -163,13 +187,14 @@ type PullRequestStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // PullRequest is the Schema for the PullRequests API. Get information on a single GitHub Pull Request. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type PullRequest struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/repo/v1alpha1/zz_repository_terraformed.go b/apis/repo/v1alpha1/zz_repository_terraformed.go new file mode 100755 index 0000000..2a53cb2 --- /dev/null +++ b/apis/repo/v1alpha1/zz_repository_terraformed.go @@ -0,0 +1,135 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Repository +func (mg *Repository) GetTerraformResourceType() string { + return "github_repository" +} + +// GetConnectionDetailsMapping for this Repository +func (tr *Repository) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Repository +func (tr *Repository) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Repository +func (tr *Repository) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Repository +func (tr *Repository) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Repository +func (tr *Repository) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Repository +func (tr *Repository) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Repository +func (tr *Repository) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Repository +func (tr *Repository) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Repository using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Repository) LateInitialize(attrs []byte) (bool, error) { + params := &RepositoryParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + opts = append(opts, resource.WithNameFilter("DefaultBranch")) + opts = append(opts, resource.WithNameFilter("Private")) + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Repository) GetTerraformSchemaVersion() int { + return 1 +} diff --git a/apis/repo/v1alpha1/zz_repository_types.go b/apis/repo/v1alpha1/zz_repository_types.go index a838508..c3d0f87 100755 --- a/apis/repo/v1alpha1/zz_repository_types.go +++ b/apis/repo/v1alpha1/zz_repository_types.go @@ -176,6 +176,7 @@ type RepositoryInitParameters struct { Template []TemplateInitParameters `json:"template,omitempty" tf:"template,omitempty"` // The list of topics of the repository. + // +listType=set Topics []*string `json:"topics,omitempty" tf:"topics,omitempty"` // Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter. @@ -313,6 +314,7 @@ type RepositoryObservation struct { Template []TemplateObservation `json:"template,omitempty" tf:"template,omitempty"` // The list of topics of the repository. + // +listType=set Topics []*string `json:"topics,omitempty" tf:"topics,omitempty"` // Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter. @@ -453,6 +455,7 @@ type RepositoryParameters struct { // The list of topics of the repository. // +kubebuilder:validation:Optional + // +listType=set Topics []*string `json:"topics,omitempty" tf:"topics,omitempty"` // Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter. @@ -633,13 +636,14 @@ type RepositoryStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Repository is the Schema for the Repositorys API. Creates and manages repositories within GitHub organizations or personal accounts // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type Repository struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/repo/v1alpha1/zz_repositoryfile_terraformed.go b/apis/repo/v1alpha1/zz_repositoryfile_terraformed.go new file mode 100755 index 0000000..d3a036a --- /dev/null +++ b/apis/repo/v1alpha1/zz_repositoryfile_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this RepositoryFile +func (mg *RepositoryFile) GetTerraformResourceType() string { + return "github_repository_file" +} + +// GetConnectionDetailsMapping for this RepositoryFile +func (tr *RepositoryFile) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this RepositoryFile +func (tr *RepositoryFile) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this RepositoryFile +func (tr *RepositoryFile) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this RepositoryFile +func (tr *RepositoryFile) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this RepositoryFile +func (tr *RepositoryFile) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this RepositoryFile +func (tr *RepositoryFile) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this RepositoryFile +func (tr *RepositoryFile) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this RepositoryFile +func (tr *RepositoryFile) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this RepositoryFile using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *RepositoryFile) LateInitialize(attrs []byte) (bool, error) { + params := &RepositoryFileParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *RepositoryFile) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/repo/v1alpha1/zz_repositoryfile_types.go b/apis/repo/v1alpha1/zz_repositoryfile_types.go index 4c080f5..9ba6e87 100755 --- a/apis/repo/v1alpha1/zz_repositoryfile_types.go +++ b/apis/repo/v1alpha1/zz_repositoryfile_types.go @@ -19,6 +19,20 @@ import ( type RepositoryFileInitParameters struct { + // Git branch (defaults to main). + // The branch must already exist, it will not be created if it does not already exist. + // The branch name, defaults to "main" + // +crossplane:generate:reference:type=Branch + Branch *string `json:"branch,omitempty" tf:"branch,omitempty"` + + // Reference to a Branch to populate branch. + // +kubebuilder:validation:Optional + BranchRef *v1.Reference `json:"branchRef,omitempty" tf:"-"` + + // Selector for a Branch to populate branch. + // +kubebuilder:validation:Optional + BranchSelector *v1.Selector `json:"branchSelector,omitempty" tf:"-"` + // Committer author name to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. This maybe useful when a branch protection rule requires signed commits. // The commit author name, defaults to the authenticated user's name. GitHub app users may omit author and email information so GitHub can verify commits as the GitHub App. CommitAuthor *string `json:"commitAuthor,omitempty" tf:"commit_author,omitempty"` @@ -42,6 +56,19 @@ type RepositoryFileInitParameters struct { // Enable overwriting existing files // Enable overwriting existing files, defaults to "false" OverwriteOnCreate *bool `json:"overwriteOnCreate,omitempty" tf:"overwrite_on_create,omitempty"` + + // The repository to create the file in. + // The repository name + // +crossplane:generate:reference:type=Repository + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + + // Reference to a Repository to populate repository. + // +kubebuilder:validation:Optional + RepositoryRef *v1.Reference `json:"repositoryRef,omitempty" tf:"-"` + + // Selector for a Repository to populate repository. + // +kubebuilder:validation:Optional + RepositorySelector *v1.Selector `json:"repositorySelector,omitempty" tf:"-"` } type RepositoryFileObservation struct { @@ -176,13 +203,14 @@ type RepositoryFileStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // RepositoryFile is the Schema for the RepositoryFiles API. Creates and manages files within a GitHub repository // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type RepositoryFile struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/team/v1alpha1/zz_generated.conversion_hubs.go b/apis/team/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..9ca6c9f --- /dev/null +++ b/apis/team/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,17 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *Team) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *TeamRepository) Hub() {} diff --git a/apis/team/v1alpha1/zz_generated.deepcopy.go b/apis/team/v1alpha1/zz_generated.deepcopy.go index 8375d5f..bc66141 100644 --- a/apis/team/v1alpha1/zz_generated.deepcopy.go +++ b/apis/team/v1alpha1/zz_generated.deepcopy.go @@ -267,6 +267,36 @@ func (in *TeamRepositoryInitParameters) DeepCopyInto(out *TeamRepositoryInitPara *out = new(string) **out = **in } + if in.Repository != nil { + in, out := &in.Repository, &out.Repository + *out = new(string) + **out = **in + } + if in.RepositoryRef != nil { + in, out := &in.RepositoryRef, &out.RepositoryRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.RepositorySelector != nil { + in, out := &in.RepositorySelector, &out.RepositorySelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } + if in.TeamID != nil { + in, out := &in.TeamID, &out.TeamID + *out = new(string) + **out = **in + } + if in.TeamIDRef != nil { + in, out := &in.TeamIDRef, &out.TeamIDRef + *out = new(v1.Reference) + (*in).DeepCopyInto(*out) + } + if in.TeamIDSelector != nil { + in, out := &in.TeamIDSelector, &out.TeamIDSelector + *out = new(v1.Selector) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TeamRepositoryInitParameters. diff --git a/apis/team/v1alpha1/zz_generated.resolvers.go b/apis/team/v1alpha1/zz_generated.resolvers.go index 78e19c6..5cfa561 100644 --- a/apis/team/v1alpha1/zz_generated.resolvers.go +++ b/apis/team/v1alpha1/zz_generated.resolvers.go @@ -52,5 +52,37 @@ func (mg *TeamRepository) ResolveReferences(ctx context.Context, c client.Reader mg.Spec.ForProvider.TeamID = reference.ToPtrValue(rsp.ResolvedValue) mg.Spec.ForProvider.TeamIDRef = rsp.ResolvedReference + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.Repository), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.RepositoryRef, + Selector: mg.Spec.InitProvider.RepositorySelector, + To: reference.To{ + List: &v1alpha1.RepositoryList{}, + Managed: &v1alpha1.Repository{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.Repository") + } + mg.Spec.InitProvider.Repository = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.RepositoryRef = rsp.ResolvedReference + + rsp, err = r.Resolve(ctx, reference.ResolutionRequest{ + CurrentValue: reference.FromPtrValue(mg.Spec.InitProvider.TeamID), + Extract: reference.ExternalName(), + Reference: mg.Spec.InitProvider.TeamIDRef, + Selector: mg.Spec.InitProvider.TeamIDSelector, + To: reference.To{ + List: &TeamList{}, + Managed: &Team{}, + }, + }) + if err != nil { + return errors.Wrap(err, "mg.Spec.InitProvider.TeamID") + } + mg.Spec.InitProvider.TeamID = reference.ToPtrValue(rsp.ResolvedValue) + mg.Spec.InitProvider.TeamIDRef = rsp.ResolvedReference + return nil } diff --git a/apis/team/v1alpha1/zz_team_terraformed.go b/apis/team/v1alpha1/zz_team_terraformed.go new file mode 100755 index 0000000..67205be --- /dev/null +++ b/apis/team/v1alpha1/zz_team_terraformed.go @@ -0,0 +1,133 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + "dario.cat/mergo" + "github.com/pkg/errors" + + "github.com/crossplane/upjet/pkg/resource" + "github.com/crossplane/upjet/pkg/resource/json" +) + +// GetTerraformResourceType returns Terraform resource type for this Team +func (mg *Team) GetTerraformResourceType() string { + return "github_team" +} + +// GetConnectionDetailsMapping for this Team +func (tr *Team) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this Team +func (tr *Team) GetObservation() (map[string]any, error) { + o, err := json.TFParser.Marshal(tr.Status.AtProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(o, &base) +} + +// SetObservation for this Team +func (tr *Team) SetObservation(obs map[string]any) error { + p, err := json.TFParser.Marshal(obs) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) +} + +// GetID returns ID of underlying Terraform resource of this Team +func (tr *Team) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this Team +func (tr *Team) GetParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.ForProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// SetParameters for this Team +func (tr *Team) SetParameters(params map[string]any) error { + p, err := json.TFParser.Marshal(params) + if err != nil { + return err + } + return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) +} + +// GetInitParameters of this Team +func (tr *Team) GetInitParameters() (map[string]any, error) { + p, err := json.TFParser.Marshal(tr.Spec.InitProvider) + if err != nil { + return nil, err + } + base := map[string]any{} + return base, json.TFParser.Unmarshal(p, &base) +} + +// GetInitParameters of this Team +func (tr *Team) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + +// LateInitialize this Team using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *Team) LateInitialize(attrs []byte) (bool, error) { + params := &TeamParameters{} + if err := json.TFParser.Unmarshal(attrs, params); err != nil { + return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") + } + opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} + + li := resource.NewGenericLateInitializer(opts...) + return li.LateInitialize(&tr.Spec.ForProvider, params) +} + +// GetTerraformSchemaVersion returns the associated Terraform schema version +func (tr *Team) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/team/v1alpha1/zz_team_types.go b/apis/team/v1alpha1/zz_team_types.go index a6622a4..6d0c46e 100755 --- a/apis/team/v1alpha1/zz_team_types.go +++ b/apis/team/v1alpha1/zz_team_types.go @@ -128,13 +128,14 @@ type TeamStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // Team is the Schema for the Teams API. Provides a GitHub team resource. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type Team struct { metav1.TypeMeta `json:",inline"` diff --git a/apis/team/v1alpha1/zz_generated_terraformed.go b/apis/team/v1alpha1/zz_teamrepository_terraformed.go similarity index 53% rename from apis/team/v1alpha1/zz_generated_terraformed.go rename to apis/team/v1alpha1/zz_teamrepository_terraformed.go index bd0ddca..30adf76 100755 --- a/apis/team/v1alpha1/zz_generated_terraformed.go +++ b/apis/team/v1alpha1/zz_teamrepository_terraformed.go @@ -18,120 +18,6 @@ import ( "github.com/crossplane/upjet/pkg/resource/json" ) -// GetTerraformResourceType returns Terraform resource type for this Team -func (mg *Team) GetTerraformResourceType() string { - return "github_team" -} - -// GetConnectionDetailsMapping for this Team -func (tr *Team) GetConnectionDetailsMapping() map[string]string { - return nil -} - -// GetObservation of this Team -func (tr *Team) GetObservation() (map[string]any, error) { - o, err := json.TFParser.Marshal(tr.Status.AtProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(o, &base) -} - -// SetObservation for this Team -func (tr *Team) SetObservation(obs map[string]any) error { - p, err := json.TFParser.Marshal(obs) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Status.AtProvider) -} - -// GetID returns ID of underlying Terraform resource of this Team -func (tr *Team) GetID() string { - if tr.Status.AtProvider.ID == nil { - return "" - } - return *tr.Status.AtProvider.ID -} - -// GetParameters of this Team -func (tr *Team) GetParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.ForProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// SetParameters for this Team -func (tr *Team) SetParameters(params map[string]any) error { - p, err := json.TFParser.Marshal(params) - if err != nil { - return err - } - return json.TFParser.Unmarshal(p, &tr.Spec.ForProvider) -} - -// GetInitParameters of this Team -func (tr *Team) GetInitParameters() (map[string]any, error) { - p, err := json.TFParser.Marshal(tr.Spec.InitProvider) - if err != nil { - return nil, err - } - base := map[string]any{} - return base, json.TFParser.Unmarshal(p, &base) -} - -// GetInitParameters of this Team -func (tr *Team) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { - params, err := tr.GetParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) - } - if !shouldMergeInitProvider { - return params, nil - } - - initParams, err := tr.GetInitParameters() - if err != nil { - return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) - } - - // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the - // slices from the initProvider to forProvider. As it also sets - // overwrite to true, we need to set it back to false, we don't - // want to overwrite the forProvider fields with the initProvider - // fields. - err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { - c.Overwrite = false - }) - if err != nil { - return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) - } - - return params, nil -} - -// LateInitialize this Team using its observed tfState. -// returns True if there are any spec changes for the resource. -func (tr *Team) LateInitialize(attrs []byte) (bool, error) { - params := &TeamParameters{} - if err := json.TFParser.Unmarshal(attrs, params); err != nil { - return false, errors.Wrap(err, "failed to unmarshal Terraform state parameters for late-initialization") - } - opts := []resource.GenericLateInitializerOption{resource.WithZeroValueJSONOmitEmptyFilter(resource.CNameWildcard)} - - li := resource.NewGenericLateInitializer(opts...) - return li.LateInitialize(&tr.Spec.ForProvider, params) -} - -// GetTerraformSchemaVersion returns the associated Terraform schema version -func (tr *Team) GetTerraformSchemaVersion() int { - return 0 -} - // GetTerraformResourceType returns Terraform resource type for this TeamRepository func (mg *TeamRepository) GetTerraformResourceType() string { return "github_team_repository" diff --git a/apis/team/v1alpha1/zz_teamrepository_types.go b/apis/team/v1alpha1/zz_teamrepository_types.go index 7023e47..1dcac0a 100755 --- a/apis/team/v1alpha1/zz_teamrepository_types.go +++ b/apis/team/v1alpha1/zz_teamrepository_types.go @@ -22,6 +22,31 @@ type TeamRepositoryInitParameters struct { // The permissions of team members regarding the repository. // Must be one of pull, triage, push, maintain, admin or the name of an existing custom repository role within the organisation. Defaults to pull. Permission *string `json:"permission,omitempty" tf:"permission,omitempty"` + + // The repository to add to the team. + // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/repo/v1alpha1.Repository + Repository *string `json:"repository,omitempty" tf:"repository,omitempty"` + + // Reference to a Repository in repo to populate repository. + // +kubebuilder:validation:Optional + RepositoryRef *v1.Reference `json:"repositoryRef,omitempty" tf:"-"` + + // Selector for a Repository in repo to populate repository. + // +kubebuilder:validation:Optional + RepositorySelector *v1.Selector `json:"repositorySelector,omitempty" tf:"-"` + + // The GitHub team id or the GitHub team slug + // ID or slug of team + // +crossplane:generate:reference:type=github.com/coopnorge/provider-github/apis/team/v1alpha1.Team + TeamID *string `json:"teamId,omitempty" tf:"team_id,omitempty"` + + // Reference to a Team in team to populate teamId. + // +kubebuilder:validation:Optional + TeamIDRef *v1.Reference `json:"teamIdRef,omitempty" tf:"-"` + + // Selector for a Team in team to populate teamId. + // +kubebuilder:validation:Optional + TeamIDSelector *v1.Selector `json:"teamIdSelector,omitempty" tf:"-"` } type TeamRepositoryObservation struct { @@ -100,13 +125,14 @@ type TeamRepositoryStatus struct { } // +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion // TeamRepository is the Schema for the TeamRepositorys API. Manages the associations between teams and repositories. // +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status" // +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" // +kubebuilder:printcolumn:name="EXTERNAL-NAME",type="string",JSONPath=".metadata.annotations.crossplane\\.io/external-name" // +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp" -// +kubebuilder:subresource:status // +kubebuilder:resource:scope=Cluster,categories={crossplane,managed,github} type TeamRepository struct { metav1.TypeMeta `json:",inline"` diff --git a/examples-generated/actions/actionssecret.yaml b/examples-generated/actions/v1alpha1/actionssecret.yaml similarity index 100% rename from examples-generated/actions/actionssecret.yaml rename to examples-generated/actions/v1alpha1/actionssecret.yaml diff --git a/examples-generated/repo/branch.yaml b/examples-generated/repo/v1alpha1/branch.yaml similarity index 100% rename from examples-generated/repo/branch.yaml rename to examples-generated/repo/v1alpha1/branch.yaml diff --git a/examples-generated/repo/branchprotection.yaml b/examples-generated/repo/v1alpha1/branchprotection.yaml similarity index 100% rename from examples-generated/repo/branchprotection.yaml rename to examples-generated/repo/v1alpha1/branchprotection.yaml diff --git a/examples-generated/repo/defaultbranch.yaml b/examples-generated/repo/v1alpha1/defaultbranch.yaml similarity index 100% rename from examples-generated/repo/defaultbranch.yaml rename to examples-generated/repo/v1alpha1/defaultbranch.yaml diff --git a/examples-generated/repo/deploykey.yaml b/examples-generated/repo/v1alpha1/deploykey.yaml similarity index 100% rename from examples-generated/repo/deploykey.yaml rename to examples-generated/repo/v1alpha1/deploykey.yaml diff --git a/examples-generated/repo/pullrequest.yaml b/examples-generated/repo/v1alpha1/pullrequest.yaml similarity index 100% rename from examples-generated/repo/pullrequest.yaml rename to examples-generated/repo/v1alpha1/pullrequest.yaml diff --git a/examples-generated/repo/repository.yaml b/examples-generated/repo/v1alpha1/repository.yaml similarity index 100% rename from examples-generated/repo/repository.yaml rename to examples-generated/repo/v1alpha1/repository.yaml diff --git a/examples-generated/repo/repositoryfile.yaml b/examples-generated/repo/v1alpha1/repositoryfile.yaml similarity index 100% rename from examples-generated/repo/repositoryfile.yaml rename to examples-generated/repo/v1alpha1/repositoryfile.yaml diff --git a/examples-generated/team/team.yaml b/examples-generated/team/v1alpha1/team.yaml similarity index 100% rename from examples-generated/team/team.yaml rename to examples-generated/team/v1alpha1/team.yaml diff --git a/examples-generated/team/teamrepository.yaml b/examples-generated/team/v1alpha1/teamrepository.yaml similarity index 100% rename from examples-generated/team/teamrepository.yaml rename to examples-generated/team/v1alpha1/teamrepository.yaml diff --git a/go.mod b/go.mod index d3b5dae..d2d5657 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( dario.cat/mergo v1.0.0 github.com/crossplane/crossplane-runtime v1.14.1 github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 - github.com/crossplane/upjet v1.0.0 + github.com/crossplane/upjet v1.1.0 github.com/pkg/errors v0.9.1 gopkg.in/alecthomas/kingpin.v2 v2.2.6 k8s.io/apimachinery v0.28.3 @@ -21,7 +21,7 @@ require ( github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/antchfx/htmlquery v1.2.4 // indirect github.com/antchfx/xpath v1.2.0 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect + github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/dave/jennifer v1.4.1 // indirect @@ -45,18 +45,21 @@ require ( github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.3.1 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.2.1 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-hclog v1.5.0 // indirect + github.com/hashicorp/go-plugin v1.5.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect - github.com/hashicorp/hcl/v2 v2.14.1 // indirect + github.com/hashicorp/hcl/v2 v2.19.1 // indirect github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-json v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect - github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect - github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 // indirect + github.com/hashicorp/terraform-json v0.17.1 // indirect + github.com/hashicorp/terraform-plugin-framework v1.4.1 // indirect + github.com/hashicorp/terraform-plugin-go v0.19.0 // indirect + github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect + github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 // indirect + github.com/hashicorp/terraform-registry-address v0.2.2 // indirect + github.com/hashicorp/terraform-svchost v0.1.1 // indirect + github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/imdario/mergo v0.3.16 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -76,6 +79,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 // indirect + github.com/oklog/run v1.0.0 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect @@ -85,10 +89,10 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/tmccombs/hcl2json v0.3.3 // indirect github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect - github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/yuin/goldmark v1.4.13 // indirect - github.com/zclconf/go-cty v1.11.0 // indirect + github.com/zclconf/go-cty v1.14.1 // indirect github.com/zclconf/go-cty-yaml v1.0.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect @@ -96,9 +100,9 @@ require ( golang.org/x/mod v0.13.0 // indirect golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.11.0 // indirect - golang.org/x/sys v0.13.0 // indirect + golang.org/x/sys v0.14.0 // indirect golang.org/x/term v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect golang.org/x/tools v0.14.0 // indirect gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect diff --git a/go.sum b/go.sum index 6c1d28b..d934dc4 100644 --- a/go.sum +++ b/go.sum @@ -53,14 +53,15 @@ github.com/antchfx/htmlquery v1.2.4/go.mod h1:2xO6iu3EVWs7R2JYqBbp8YzG50gj/ofqs5 github.com/antchfx/xpath v1.2.0 h1:mbwv7co+x0RwgeGAOHdrKy89GvHaGvxxBtPK0uF9Zr8= github.com/antchfx/xpath v1.2.0/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= -github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/apparentlymart/go-textseg/v15 v15.0.0 h1:uYvfpb3DyLSCGWnctWKGj857c6ew1u1fNQOlOtuGxQY= +github.com/apparentlymart/go-textseg/v15 v15.0.0/go.mod h1:K8XmNZdhEBkdlyDdvbmmsvpAG721bKi0joRfFdHIWJ4= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= @@ -77,8 +78,8 @@ github.com/crossplane/crossplane-runtime v1.14.1 h1:TCa7R1N4bDGHjsLhiRxR/mUhwmis github.com/crossplane/crossplane-runtime v1.14.1/go.mod h1:aOP+5W2wKpvthVs3pFNbVOe1jwrKYbJho0ThGNCVz9o= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= -github.com/crossplane/upjet v1.0.0 h1:/R509m+c5XTLsd9oXTEaLj2yIbM/EUmG34XOou1dugM= -github.com/crossplane/upjet v1.0.0/go.mod h1:t9etxIdYaxgyvFPBToikm5zBHi8RIpX8N4mTH77lQFM= +github.com/crossplane/upjet v1.1.0 h1:jfdag6qaF1/5mvlDT/8LdTc/vq1Iq0ASnmk3yV86I9U= +github.com/crossplane/upjet v1.1.0/go.mod h1:0bHLtnejZ9bDeyXuBb9MSOQLvKo3+aoTeUBO8N0dGSA= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -172,7 +173,6 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -199,35 +199,39 @@ github.com/google/uuid v1.3.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= -github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-hclog v1.5.0 h1:bI2ocEMgcVlz55Oj1xZNBsVi900c7II+fWDyV9o+13c= +github.com/hashicorp/go-hclog v1.5.0/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= +github.com/hashicorp/go-plugin v1.5.1 h1:oGm7cWBaYIp3lJpx1RUEfLWophprE2EV/KUeqBYo+6k= +github.com/hashicorp/go-plugin v1.5.1/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl/v2 v2.9.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= -github.com/hashicorp/hcl/v2 v2.14.1 h1:x0BpjfZ+CYdbiz+8yZTQ+gdLO7IXvOut7Da+XJayx34= -github.com/hashicorp/hcl/v2 v2.14.1/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= +github.com/hashicorp/hcl/v2 v2.19.1 h1://i05Jqznmb2EXqa39Nsvyan2o5XyMowW5fnCKW5RPI= +github.com/hashicorp/hcl/v2 v2.19.1/go.mod h1:ThLC89FV4p9MPW804KVbe/cEXoQ8NZEh+JtMeeGErHE= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4= -github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE= -github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= -github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 h1:FtCLTiTcykdsURXPt/ku7fYXm3y19nbzbZcUxHx9RbI= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0/go.mod h1:80wf5oad1tW+oLnbXS4UTYmDCrl7BuN1Q+IA91X1a4Y= +github.com/hashicorp/terraform-json v0.17.1 h1:eMfvh/uWggKmY7Pmb3T85u86E2EQg6EQHgyRwf3RkyA= +github.com/hashicorp/terraform-json v0.17.1/go.mod h1:Huy6zt6euxaY9knPAFKjUITn8QxUFIe9VuSzb4zn/0o= +github.com/hashicorp/terraform-plugin-framework v1.4.1 h1:ZC29MoB3Nbov6axHdgPbMz7799pT5H8kIrM8YAsaVrs= +github.com/hashicorp/terraform-plugin-framework v1.4.1/go.mod h1:XC0hPcQbBvlbxwmjxuV/8sn8SbZRg4XwGMs22f+kqV0= +github.com/hashicorp/terraform-plugin-go v0.19.0 h1:BuZx/6Cp+lkmiG0cOBk6Zps0Cb2tmqQpDM3iAtnhDQU= +github.com/hashicorp/terraform-plugin-go v0.19.0/go.mod h1:EhRSkEPNoylLQntYsk5KrDHTZJh9HQoumZXbOGOXmec= +github.com/hashicorp/terraform-plugin-log v0.9.0 h1:i7hOA+vdAItN1/7UrfBqBwvYPQ9TFvymaRGZED3FCV0= +github.com/hashicorp/terraform-plugin-log v0.9.0/go.mod h1:rKL8egZQ/eXSyDqzLUuwUYLVdlYeamldAHSxjUFADow= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0 h1:X7vB6vn5tON2b49ILa4W7mFAsndeqJ7bZFOGbVO+0Cc= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.30.0/go.mod h1:ydFcxbdj6klCqYEPkPvdvFKiNGKZLUs+896ODUXCyao= +github.com/hashicorp/terraform-registry-address v0.2.2 h1:lPQBg403El8PPicg/qONZJDC6YlgCVbWDtNmmZKtBno= +github.com/hashicorp/terraform-registry-address v0.2.2/go.mod h1:LtwNbCihUoUZ3RYriyS2wF/lGPB6gF9ICLRtuDk7hSo= +github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ= +github.com/hashicorp/terraform-svchost v0.1.1/go.mod h1:mNsjQfZyf/Jhz35v6/0LWcv26+X7JPS+buii2c9/ctc= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -237,6 +241,7 @@ github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+h github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -291,8 +296,9 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 h1:CxRHKnh1YJXgNKxcos9rrKL6AcmOl1AS/fygmxFDzh4= github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7/go.mod h1:SAAdeMEiFXR8LcHffvIdiLI1w243DCH2DuHq7UrA5YQ= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= github.com/onsi/ginkgo/v2 v2.11.0 h1:WgqUCUt/lT6yXoQ8Wef0fsNn5cAuMK7+KT9UFRz2tcU= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= @@ -314,7 +320,6 @@ github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPH github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= @@ -331,6 +336,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= @@ -342,10 +348,12 @@ github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeI github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -356,9 +364,8 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.8.1/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= -github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= +github.com/zclconf/go-cty v1.14.1 h1:t9fyA35fwjjUMcmL5hLER+e/rEPqrbCK1/OSE4SI9KA= +github.com/zclconf/go-cty v1.14.1/go.mod h1:VvMs5i0vgZdhYawQNq5kePSpLAoz8u1xvZgrPIxfnZE= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.3 h1:og/eOQ7lvA/WWhHGFETVWNduJM7Rjsv2RRpx1sdFMLc= github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= @@ -527,8 +534,8 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= -golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= +golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= @@ -541,8 +548,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/internal/controller/actions/actionssecret/zz_controller.go b/internal/controller/actions/actionssecret/zz_controller.go index ec1797f..5e6535c 100755 --- a/internal/controller/actions/actionssecret/zz_controller.go +++ b/internal/controller/actions/actionssecret/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/actions/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.ActionsSecret + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.ActionsSecret{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.ActionsSecret") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.ActionsSecret_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/repo/branch/zz_controller.go b/internal/controller/repo/branch/zz_controller.go index ef73e99..c835bbc 100755 --- a/internal/controller/repo/branch/zz_controller.go +++ b/internal/controller/repo/branch/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" @@ -56,6 +57,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Branch + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Branch{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Branch") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Branch_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/repo/branchprotection/zz_controller.go b/internal/controller/repo/branchprotection/zz_controller.go index 88aea23..66d0a01 100755 --- a/internal/controller/repo/branchprotection/zz_controller.go +++ b/internal/controller/repo/branchprotection/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.BranchProtection + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.BranchProtection{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.BranchProtection") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.BranchProtection_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/repo/defaultbranch/zz_controller.go b/internal/controller/repo/defaultbranch/zz_controller.go index ab0349b..7673acb 100755 --- a/internal/controller/repo/defaultbranch/zz_controller.go +++ b/internal/controller/repo/defaultbranch/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" @@ -56,6 +57,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.DefaultBranch + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.DefaultBranch{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.DefaultBranch") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DefaultBranch_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/repo/deploykey/zz_controller.go b/internal/controller/repo/deploykey/zz_controller.go index ba1e076..782140c 100755 --- a/internal/controller/repo/deploykey/zz_controller.go +++ b/internal/controller/repo/deploykey/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.DeployKey + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.DeployKey{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.DeployKey") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.DeployKey_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/repo/pullrequest/zz_controller.go b/internal/controller/repo/pullrequest/zz_controller.go index cf72b7d..6c7549f 100755 --- a/internal/controller/repo/pullrequest/zz_controller.go +++ b/internal/controller/repo/pullrequest/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.PullRequest + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.PullRequest{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.PullRequest") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.PullRequest_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/repo/repository/zz_controller.go b/internal/controller/repo/repository/zz_controller.go index fe0ab37..a67f410 100755 --- a/internal/controller/repo/repository/zz_controller.go +++ b/internal/controller/repo/repository/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Repository + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Repository{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Repository") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Repository_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/repo/repositoryfile/zz_controller.go b/internal/controller/repo/repositoryfile/zz_controller.go index 5480635..5ef5fea 100755 --- a/internal/controller/repo/repositoryfile/zz_controller.go +++ b/internal/controller/repo/repositoryfile/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/repo/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.RepositoryFile + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.RepositoryFile{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.RepositoryFile") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.RepositoryFile_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/team/team/zz_controller.go b/internal/controller/team/team/zz_controller.go index dfd4831..58d693d 100755 --- a/internal/controller/team/team/zz_controller.go +++ b/internal/controller/team/team/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/team/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.Team + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.Team{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.Team") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.Team_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/internal/controller/team/teamrepository/zz_controller.go b/internal/controller/team/teamrepository/zz_controller.go index 338638b..caa67aa 100755 --- a/internal/controller/team/teamrepository/zz_controller.go +++ b/internal/controller/team/teamrepository/zz_controller.go @@ -21,6 +21,7 @@ import ( tjcontroller "github.com/crossplane/upjet/pkg/controller" "github.com/crossplane/upjet/pkg/controller/handler" "github.com/crossplane/upjet/pkg/terraform" + "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" v1alpha1 "github.com/coopnorge/provider-github/apis/team/v1alpha1" @@ -55,6 +56,17 @@ func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { if o.Features.Enabled(features.EnableBetaManagementPolicies) { opts = append(opts, managed.WithManagementPolicies()) } + + // register webhooks for the kind v1alpha1.TeamRepository + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.TeamRepository{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.TeamRepository") + } + } + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.TeamRepository_GroupVersionKind), opts...) return ctrl.NewControllerManagedBy(mgr). diff --git a/package/crds/actions.template.upbound.io_actionssecrets.yaml b/package/crds/actions.template.upbound.io_actionssecrets.yaml index b409461..6ffab9a 100644 --- a/package/crds/actions.template.upbound.io_actionssecrets.yaml +++ b/package/crds/actions.template.upbound.io_actionssecrets.yaml @@ -194,6 +194,82 @@ spec: for example because of an external controller is managing them, like an autoscaler. properties: + repository: + description: Name of the repository + type: string + repositoryRef: + description: Reference to a Repository in repo to populate repository. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + repositorySelector: + description: Selector for a Repository in repo to populate repository. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object secretName: description: Name of the secret type: string diff --git a/package/crds/repo.template.upbound.io_branchprotections.yaml b/package/crds/repo.template.upbound.io_branchprotections.yaml index 3940302..270581f 100644 --- a/package/crds/repo.template.upbound.io_branchprotections.yaml +++ b/package/crds/repo.template.upbound.io_branchprotections.yaml @@ -97,6 +97,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set repositoryId: description: The name or node ID of the repository associated with this branch protection rule. Node ID or name of repository @@ -204,6 +205,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set pullRequestBypassers: description: ': The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must @@ -212,6 +214,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set requireCodeOwnerReviews: description: ': Require an approved review in pull requests including files with a designated code owner. Defaults @@ -244,6 +247,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set strict: description: ': Require branches to be up to date before merging. Defaults to false.' @@ -293,6 +297,84 @@ spec: items: type: string type: array + x-kubernetes-list-type: set + repositoryId: + description: The name or node ID of the repository associated + with this branch protection rule. Node ID or name of repository + type: string + repositoryIdRef: + description: Reference to a Repository in repo to populate repositoryId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + repositoryIdSelector: + description: Selector for a Repository in repo to populate repositoryId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object requireConversationResolution: description: Boolean, setting this to true requires all conversations on code must be resolved before a pull request can be merged. @@ -323,6 +405,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set pullRequestBypassers: description: ': The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must @@ -331,6 +414,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set requireCodeOwnerReviews: description: ': Require an approved review in pull requests including files with a designated code owner. Defaults @@ -363,6 +447,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set strict: description: ': Require branches to be up to date before merging. Defaults to false.' @@ -572,6 +657,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set repositoryId: description: The name or node ID of the repository associated with this branch protection rule. Node ID or name of repository @@ -606,6 +692,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set pullRequestBypassers: description: ': The list of actor Names/IDs that are allowed to bypass pull request requirements. Actor names must @@ -614,6 +701,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set requireCodeOwnerReviews: description: ': Require an approved review in pull requests including files with a designated code owner. Defaults @@ -646,6 +734,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set strict: description: ': Require branches to be up to date before merging. Defaults to false.' diff --git a/package/crds/repo.template.upbound.io_defaultbranches.yaml b/package/crds/repo.template.upbound.io_defaultbranches.yaml index 035cc93..d0fa15b 100644 --- a/package/crds/repo.template.upbound.io_defaultbranches.yaml +++ b/package/crds/repo.template.upbound.io_defaultbranches.yaml @@ -155,6 +155,83 @@ spec: on creation, but we do not desire to update them after creation, for example because of an external controller is managing them, like an autoscaler. + properties: + branch: + description: The branch (e.g. main) + type: string + branchRef: + description: Reference to a Branch in repo to populate branch. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + branchSelector: + description: Selector for a Branch in repo to populate branch. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: diff --git a/package/crds/repo.template.upbound.io_deploykeys.yaml b/package/crds/repo.template.upbound.io_deploykeys.yaml index 0e914e1..a9dbf7f 100644 --- a/package/crds/repo.template.upbound.io_deploykeys.yaml +++ b/package/crds/repo.template.upbound.io_deploykeys.yaml @@ -173,6 +173,82 @@ spec: description: A boolean qualifying the key to be either read only or read/write. type: boolean + repository: + description: Name of the GitHub repository. + type: string + repositoryRef: + description: Reference to a Repository to populate repository. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + repositorySelector: + description: Selector for a Repository to populate repository. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object title: description: A title. type: string diff --git a/package/crds/repo.template.upbound.io_pullrequests.yaml b/package/crds/repo.template.upbound.io_pullrequests.yaml index 6eab611..0a15537 100644 --- a/package/crds/repo.template.upbound.io_pullrequests.yaml +++ b/package/crds/repo.template.upbound.io_pullrequests.yaml @@ -256,9 +256,163 @@ spec: description: Name of the branch serving as the base of the Pull Request. type: string + baseRepository: + description: Name of the base repository to retrieve the Pull + Requests from. + type: string + baseRepositoryRef: + description: Reference to a Repository in repo to populate baseRepository. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + baseRepositorySelector: + description: Selector for a Repository in repo to populate baseRepository. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object body: description: Body of the Pull Request. type: string + headRef: + description: Name of the branch serving as the head of the Pull + Request. + type: string + headRefRef: + description: Reference to a Branch in repo to populate headRef. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + headRefSelector: + description: Selector for a Branch in repo to populate headRef. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object maintainerCanModify: description: 'Controls whether the base repository maintainers can modify the Pull Request. Default: false.' diff --git a/package/crds/repo.template.upbound.io_repositories.yaml b/package/crds/repo.template.upbound.io_repositories.yaml index 693665e..2914350 100644 --- a/package/crds/repo.template.upbound.io_repositories.yaml +++ b/package/crds/repo.template.upbound.io_repositories.yaml @@ -287,6 +287,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set visibility: description: Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise @@ -536,6 +537,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set visibility: description: Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise @@ -991,6 +993,7 @@ spec: items: type: string type: array + x-kubernetes-list-type: set visibility: description: Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise diff --git a/package/crds/repo.template.upbound.io_repositoryfiles.yaml b/package/crds/repo.template.upbound.io_repositoryfiles.yaml index 09da37a..27afe31 100644 --- a/package/crds/repo.template.upbound.io_repositoryfiles.yaml +++ b/package/crds/repo.template.upbound.io_repositoryfiles.yaml @@ -269,6 +269,84 @@ spec: for example because of an external controller is managing them, like an autoscaler. properties: + branch: + description: Git branch (defaults to main). The branch must already + exist, it will not be created if it does not already exist. + The branch name, defaults to "main" + type: string + branchRef: + description: Reference to a Branch to populate branch. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + branchSelector: + description: Selector for a Branch to populate branch. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object commitAuthor: description: 'Committer author name to use. NOTE: GitHub app users may omit author and email information so GitHub can verify commits @@ -303,6 +381,83 @@ spec: description: Enable overwriting existing files Enable overwriting existing files, defaults to "false" type: boolean + repository: + description: The repository to create the file in. The repository + name + type: string + repositoryRef: + description: Reference to a Repository to populate repository. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + repositorySelector: + description: Selector for a Repository to populate repository. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: diff --git a/package/crds/team.template.upbound.io_teamrepositories.yaml b/package/crds/team.template.upbound.io_teamrepositories.yaml index 029cfe7..215bf60 100644 --- a/package/crds/team.template.upbound.io_teamrepositories.yaml +++ b/package/crds/team.template.upbound.io_teamrepositories.yaml @@ -245,6 +245,159 @@ spec: of an existing custom repository role within the organisation. Defaults to pull. type: string + repository: + description: The repository to add to the team. + type: string + repositoryRef: + description: Reference to a Repository in repo to populate repository. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + repositorySelector: + description: Selector for a Repository in repo to populate repository. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object + teamId: + description: The GitHub team id or the GitHub team slug ID or + slug of team + type: string + teamIdRef: + description: Reference to a Team in team to populate teamId. + properties: + name: + description: Name of the referenced object. + type: string + policy: + description: Policies for referencing. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + required: + - name + type: object + teamIdSelector: + description: Selector for a Team in team to populate teamId. + properties: + matchControllerRef: + description: MatchControllerRef ensures an object with the + same controller reference as the selecting object is selected. + type: boolean + matchLabels: + additionalProperties: + type: string + description: MatchLabels ensures an object with matching labels + is selected. + type: object + policy: + description: Policies for selection. + properties: + resolution: + default: Required + description: Resolution specifies whether resolution of + this reference is required. The default is 'Required', + which means the reconcile will fail if the reference + cannot be resolved. 'Optional' means this reference + will be a no-op if it cannot be resolved. + enum: + - Required + - Optional + type: string + resolve: + description: Resolve specifies when this reference should + be resolved. The default is 'IfNotPresent', which will + attempt to resolve the reference only when the corresponding + field is not present. Use 'Always' to resolve the reference + on every reconcile. + enum: + - Always + - IfNotPresent + type: string + type: object + type: object type: object managementPolicies: default: From 59823507875600dea385543197498ea757c68ce3 Mon Sep 17 00:00:00 2001 From: Atze de Vries Date: Tue, 6 Feb 2024 12:00:48 +0100 Subject: [PATCH 5/7] fix some static code --- cmd/provider/main.go | 31 ++++++++++++++------ go.mod | 1 + go.sum | 2 ++ internal/controller/providerconfig/config.go | 8 ++--- internal/features/features.go | 11 +++++-- 5 files changed, 37 insertions(+), 16 deletions(-) diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 9e5becd..cf1ee27 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -12,6 +12,7 @@ import ( xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" xpcontroller "github.com/crossplane/crossplane-runtime/pkg/controller" + "github.com/crossplane/crossplane-runtime/pkg/feature" "github.com/crossplane/crossplane-runtime/pkg/logging" "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" "github.com/crossplane/crossplane-runtime/pkg/resource" @@ -22,6 +23,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/tools/leaderelection/resourcelock" ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/log/zap" "github.com/coopnorge/provider-github/apis" @@ -37,14 +39,17 @@ func main() { app = kingpin.New(filepath.Base(os.Args[0]), "Terraform based Crossplane provider for GitHub").DefaultEnvars() debug = app.Flag("debug", "Run with debug logging.").Short('d').Bool() syncPeriod = app.Flag("sync", "Controller manager sync period such as 300ms, 1.5h, or 2h45m").Short('s').Default("1h").Duration() + pollInterval = app.Flag("poll", "Poll interval controls how often an individual resource should be checked for drift.").Default("10m").Duration() leaderElection = app.Flag("leader-election", "Use leader election for the controller manager.").Short('l').Default("false").OverrideDefaultFromEnvar("LEADER_ELECTION").Bool() + maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may be checked for drift from the desired state.").Default("10").Int() + terraformVersion = app.Flag("terraform-version", "Terraform version.").Required().Envar("TERRAFORM_VERSION").String() providerSource = app.Flag("terraform-provider-source", "Terraform provider source.").Required().Envar("TERRAFORM_PROVIDER_SOURCE").String() providerVersion = app.Flag("terraform-provider-version", "Terraform provider version.").Required().Envar("TERRAFORM_PROVIDER_VERSION").String() - maxReconcileRate = app.Flag("max-reconcile-rate", "The global maximum rate per second at which resources may checked for drift from the desired state.").Default("10").Int() namespace = app.Flag("namespace", "Namespace used to set as default scope in default secret store config.").Default("crossplane-system").Envar("POD_NAMESPACE").String() enableExternalSecretStores = app.Flag("enable-external-secret-stores", "Enable support for ExternalSecretStores.").Default("false").Envar("ENABLE_EXTERNAL_SECRET_STORES").Bool() + enableManagementPolicies = app.Flag("enable-management-policies", "Enable support for Management Policies.").Default("true").Envar("ENABLE_MANAGEMENT_POLICIES").Bool() ) kingpin.MustParse(app.Parse(os.Args[1:])) @@ -58,27 +63,30 @@ func main() { ctrl.SetLogger(zl) } - log.Debug("Starting", "sync-period", syncPeriod.String()) + log.Debug("Starting", "sync-period", syncPeriod.String(), "poll-interval", pollInterval.String(), "max-reconcile-rate", *maxReconcileRate) cfg, err := ctrl.GetConfig() kingpin.FatalIfError(err, "Cannot get API server rest config") mgr, err := ctrl.NewManager(cfg, ctrl.Options{ - LeaderElection: *leaderElection, - LeaderElectionID: "crossplane-leader-election-provider-github", - SyncPeriod: syncPeriod, + LeaderElection: *leaderElection, + LeaderElectionID: "crossplane-leader-election-provider-github", + Cache: cache.Options{ + SyncPeriod: syncPeriod, + }, LeaderElectionResourceLock: resourcelock.LeasesResourceLock, LeaseDuration: func() *time.Duration { d := 60 * time.Second; return &d }(), RenewDeadline: func() *time.Duration { d := 50 * time.Second; return &d }(), }) kingpin.FatalIfError(err, "Cannot create controller manager") - kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add GitHub APIs to scheme") + kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add Template APIs to scheme") o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, GlobalRateLimiter: ratelimiter.NewGlobal(*maxReconcileRate), - PollInterval: 1 * time.Minute, - MaxConcurrentReconciles: 1, + PollInterval: *pollInterval, + MaxConcurrentReconciles: *maxReconcileRate, + Features: &feature.Flags{}, }, Provider: config.GetProvider(), // use the following WorkspaceStoreOption to enable the shared gRPC mode @@ -106,6 +114,11 @@ func main() { })), "cannot create default store config") } - kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup GitHub controllers") + if *enableManagementPolicies { + o.Features.Enable(features.EnableBetaManagementPolicies) + log.Info("Beta feature enabled", "flag", features.EnableBetaManagementPolicies) + } + + kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup Template controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } diff --git a/go.mod b/go.mod index d2d5657..fdaf5a7 100644 --- a/go.mod +++ b/go.mod @@ -8,6 +8,7 @@ require ( github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 github.com/crossplane/upjet v1.1.0 github.com/pkg/errors v0.9.1 + github.com/upbound/upjet-provider-template v0.0.0-20231113134727-64563d507d1a gopkg.in/alecthomas/kingpin.v2 v2.2.6 k8s.io/apimachinery v0.28.3 k8s.io/client-go v0.28.3 diff --git a/go.sum b/go.sum index d934dc4..67f0d10 100644 --- a/go.sum +++ b/go.sum @@ -345,6 +345,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/tmccombs/hcl2json v0.3.3 h1:+DLNYqpWE0CsOQiEZu+OZm5ZBImake3wtITYxQ8uLFQ= github.com/tmccombs/hcl2json v0.3.3/go.mod h1:Y2chtz2x9bAeRTvSibVRVgbLJhLJXKlUeIvjeVdnm4w= +github.com/upbound/upjet-provider-template v0.0.0-20231113134727-64563d507d1a h1:e1zZKSJVtWQjcwd1Z6fV1PwNXNULzl/onnS5BcIB1Cg= +github.com/upbound/upjet-provider-template v0.0.0-20231113134727-64563d507d1a/go.mod h1:2CWYFMyep8X83IzrBRPtKE+hO/4UWNISiyZonHJB/yk= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= diff --git a/internal/controller/providerconfig/config.go b/internal/controller/providerconfig/config.go index 3d747e7..73c10b4 100644 --- a/internal/controller/providerconfig/config.go +++ b/internal/controller/providerconfig/config.go @@ -5,15 +5,13 @@ Copyright 2021 Upbound Inc. package providerconfig import ( - ctrl "sigs.k8s.io/controller-runtime" - "sigs.k8s.io/controller-runtime/pkg/source" - "github.com/crossplane/crossplane-runtime/pkg/event" "github.com/crossplane/crossplane-runtime/pkg/reconciler/providerconfig" "github.com/crossplane/crossplane-runtime/pkg/resource" "github.com/crossplane/upjet/pkg/controller" + ctrl "sigs.k8s.io/controller-runtime" - "github.com/coopnorge/provider-github/apis/v1beta1" + "github.com/upbound/upjet-provider-template/apis/v1beta1" ) // Setup adds a controller that reconciles ProviderConfigs by accounting for @@ -30,7 +28,7 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { Named(name). WithOptions(o.ForControllerRuntime()). For(&v1beta1.ProviderConfig{}). - Watches(&source.Kind{Type: &v1beta1.ProviderConfigUsage{}}, &resource.EnqueueRequestForProviderConfig{}). + Watches(&v1beta1.ProviderConfigUsage{}, &resource.EnqueueRequestForProviderConfig{}). Complete(providerconfig.NewReconciler(mgr, of, providerconfig.WithLogger(o.Logger.WithValues("controller", name)), providerconfig.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))))) diff --git a/internal/features/features.go b/internal/features/features.go index 420cd55..96fd480 100644 --- a/internal/features/features.go +++ b/internal/features/features.go @@ -4,12 +4,19 @@ package features -import "github.com/crossplane/crossplane-runtime/pkg/feature" +import ( + xpfeature "github.com/crossplane/crossplane-runtime/pkg/feature" +) // Feature flags. const ( // EnableAlphaExternalSecretStores enables alpha support for // External Secret Stores. See the below design for more details. // https://github.com/crossplane/crossplane/blob/390ddd/design/design-doc-external-secret-stores.md - EnableAlphaExternalSecretStores feature.Flag = "EnableAlphaExternalSecretStores" + EnableAlphaExternalSecretStores xpfeature.Flag = "EnableAlphaExternalSecretStores" + + // EnableBetaManagementPolicies enables beta support for + // Management Policies. See the below design for more details. + // https://github.com/crossplane/crossplane/pull/3531 + EnableBetaManagementPolicies xpfeature.Flag = xpfeature.EnableBetaManagementPolicies ) From 7e8fc15ae9e4872b3ff28e17f0d5eb81b48ccd04 Mon Sep 17 00:00:00 2001 From: Atze de Vries Date: Tue, 6 Feb 2024 12:50:40 +0100 Subject: [PATCH 6/7] update submodule to upstream template --- build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build b/build index 0d8822d..bd5297b 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit 0d8822d9deb275245b0500874fee9e5a2e37d814 +Subproject commit bd5297bd16c113cbc5ed1905b1d96aa1cb3078ec From 92ededb7f22171576ade26f6a84a61a12750589f Mon Sep 17 00:00:00 2001 From: Atze de Vries Date: Tue, 6 Feb 2024 15:21:00 +0100 Subject: [PATCH 7/7] update up version to upstream --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8a0c967..ec94356 100644 --- a/Makefile +++ b/Makefile @@ -49,9 +49,9 @@ GO_SUBDIRS += cmd internal apis # Setup Kubernetes tools KIND_VERSION = v0.15.0 -UP_VERSION = v0.14.0 +UP_VERSION = v0.18.0 UP_CHANNEL = stable -UPTEST_VERSION = v0.2.1 +UPTEST_VERSION = v0.5.0 -include build/makelib/k8s_tools.mk # ====================================================================================