From 5595599166509ed5567cda81754b5a6cff3e4214 Mon Sep 17 00:00:00 2001 From: Thorsten Gilfert Date: Mon, 6 Jan 2025 16:36:44 +0100 Subject: [PATCH 1/4] Add organization level Actions secrets and variables Signed-off-by: Thorsten Gilfert --- .../v1alpha1/zz_generated.conversion_hubs.go | 13 + .../v1alpha1/zz_generated.deepcopy.go | 483 ++++++++++++++++++ .../v1alpha1/zz_generated.managed.go | 128 +++++ .../v1alpha1/zz_generated.managedlist.go | 26 + .../v1alpha1/zz_groupversion_info.go | 32 ++ ...z_organizationactionssecret_terraformed.go | 129 +++++ .../zz_organizationactionssecret_types.go | 159 ++++++ ...organizationactionsvariable_terraformed.go | 129 +++++ .../zz_organizationactionsvariable_types.go | 155 ++++++ apis/zz_register.go | 2 + config/external_name.go | 10 +- config/organizationactionssecret/config.go | 13 + config/organizationactionsvariable/config.go | 13 + config/provider.go | 4 + .../v1alpha1/organizationactionssecret.yaml | 16 + .../v1alpha1/organizationactionsvariable.yaml | 13 + .../zz_controller.go | 91 ++++ .../zz_controller.go | 91 ++++ internal/controller/zz_setup.go | 4 + ...upbound.io_organizationactionssecrets.yaml | 483 ++++++++++++++++++ ...bound.io_organizationactionsvariables.yaml | 426 +++++++++++++++ .../organization-actions-secret/secret.yaml | 20 + .../variable.yaml | 9 + 23 files changed, 2445 insertions(+), 4 deletions(-) create mode 100755 apis/organization/v1alpha1/zz_generated.conversion_hubs.go create mode 100644 apis/organization/v1alpha1/zz_generated.deepcopy.go create mode 100644 apis/organization/v1alpha1/zz_generated.managed.go create mode 100644 apis/organization/v1alpha1/zz_generated.managedlist.go create mode 100755 apis/organization/v1alpha1/zz_groupversion_info.go create mode 100755 apis/organization/v1alpha1/zz_organizationactionssecret_terraformed.go create mode 100755 apis/organization/v1alpha1/zz_organizationactionssecret_types.go create mode 100755 apis/organization/v1alpha1/zz_organizationactionsvariable_terraformed.go create mode 100755 apis/organization/v1alpha1/zz_organizationactionsvariable_types.go create mode 100644 config/organizationactionssecret/config.go create mode 100644 config/organizationactionsvariable/config.go create mode 100644 examples-generated/organization/v1alpha1/organizationactionssecret.yaml create mode 100644 examples-generated/organization/v1alpha1/organizationactionsvariable.yaml create mode 100755 internal/controller/organization/organizationactionssecret/zz_controller.go create mode 100755 internal/controller/organization/organizationactionsvariable/zz_controller.go create mode 100644 package/crds/organization.github.upbound.io_organizationactionssecrets.yaml create mode 100644 package/crds/organization.github.upbound.io_organizationactionsvariables.yaml create mode 100644 tests/cases/organization-actions-secret/secret.yaml create mode 100644 tests/cases/organization-actions-variable/variable.yaml diff --git a/apis/organization/v1alpha1/zz_generated.conversion_hubs.go b/apis/organization/v1alpha1/zz_generated.conversion_hubs.go new file mode 100755 index 0000000..cb42839 --- /dev/null +++ b/apis/organization/v1alpha1/zz_generated.conversion_hubs.go @@ -0,0 +1,13 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +// Hub marks this type as a conversion hub. +func (tr *OrganizationActionsSecret) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *OrganizationActionsVariable) Hub() {} diff --git a/apis/organization/v1alpha1/zz_generated.deepcopy.go b/apis/organization/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 0000000..556229d --- /dev/null +++ b/apis/organization/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,483 @@ +//go:build !ignore_autogenerated + +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/crossplane/crossplane-runtime/apis/common/v1" + 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 *OrganizationActionsSecret) DeepCopyInto(out *OrganizationActionsSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecret. +func (in *OrganizationActionsSecret) DeepCopy() *OrganizationActionsSecret { + if in == nil { + return nil + } + out := new(OrganizationActionsSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsSecret) 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 *OrganizationActionsSecretInitParameters) DeepCopyInto(out *OrganizationActionsSecretInitParameters) { + *out = *in + if in.EncryptedValueSecretRef != nil { + in, out := &in.EncryptedValueSecretRef, &out.EncryptedValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.PlaintextValueSecretRef != nil { + in, out := &in.PlaintextValueSecretRef, &out.PlaintextValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretInitParameters. +func (in *OrganizationActionsSecretInitParameters) DeepCopy() *OrganizationActionsSecretInitParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretList) DeepCopyInto(out *OrganizationActionsSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OrganizationActionsSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretList. +func (in *OrganizationActionsSecretList) DeepCopy() *OrganizationActionsSecretList { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsSecretList) 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 *OrganizationActionsSecretObservation) DeepCopyInto(out *OrganizationActionsSecretObservation) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretObservation. +func (in *OrganizationActionsSecretObservation) DeepCopy() *OrganizationActionsSecretObservation { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretParameters) DeepCopyInto(out *OrganizationActionsSecretParameters) { + *out = *in + if in.EncryptedValueSecretRef != nil { + in, out := &in.EncryptedValueSecretRef, &out.EncryptedValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.PlaintextValueSecretRef != nil { + in, out := &in.PlaintextValueSecretRef, &out.PlaintextValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretParameters. +func (in *OrganizationActionsSecretParameters) DeepCopy() *OrganizationActionsSecretParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretSpec) DeepCopyInto(out *OrganizationActionsSecretSpec) { + *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 OrganizationActionsSecretSpec. +func (in *OrganizationActionsSecretSpec) DeepCopy() *OrganizationActionsSecretSpec { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretStatus) DeepCopyInto(out *OrganizationActionsSecretStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretStatus. +func (in *OrganizationActionsSecretStatus) DeepCopy() *OrganizationActionsSecretStatus { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariable) DeepCopyInto(out *OrganizationActionsVariable) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariable. +func (in *OrganizationActionsVariable) DeepCopy() *OrganizationActionsVariable { + if in == nil { + return nil + } + out := new(OrganizationActionsVariable) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsVariable) 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 *OrganizationActionsVariableInitParameters) DeepCopyInto(out *OrganizationActionsVariableInitParameters) { + *out = *in + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + if in.VariableName != nil { + in, out := &in.VariableName, &out.VariableName + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableInitParameters. +func (in *OrganizationActionsVariableInitParameters) DeepCopy() *OrganizationActionsVariableInitParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableList) DeepCopyInto(out *OrganizationActionsVariableList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OrganizationActionsVariable, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableList. +func (in *OrganizationActionsVariableList) DeepCopy() *OrganizationActionsVariableList { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsVariableList) 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 *OrganizationActionsVariableObservation) DeepCopyInto(out *OrganizationActionsVariableObservation) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + if in.VariableName != nil { + in, out := &in.VariableName, &out.VariableName + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableObservation. +func (in *OrganizationActionsVariableObservation) DeepCopy() *OrganizationActionsVariableObservation { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableParameters) DeepCopyInto(out *OrganizationActionsVariableParameters) { + *out = *in + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + if in.VariableName != nil { + in, out := &in.VariableName, &out.VariableName + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableParameters. +func (in *OrganizationActionsVariableParameters) DeepCopy() *OrganizationActionsVariableParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableSpec) DeepCopyInto(out *OrganizationActionsVariableSpec) { + *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 OrganizationActionsVariableSpec. +func (in *OrganizationActionsVariableSpec) DeepCopy() *OrganizationActionsVariableSpec { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableStatus) DeepCopyInto(out *OrganizationActionsVariableStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableStatus. +func (in *OrganizationActionsVariableStatus) DeepCopy() *OrganizationActionsVariableStatus { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableStatus) + in.DeepCopyInto(out) + return out +} diff --git a/apis/organization/v1alpha1/zz_generated.managed.go b/apis/organization/v1alpha1/zz_generated.managed.go new file mode 100644 index 0000000..b949cd1 --- /dev/null +++ b/apis/organization/v1alpha1/zz_generated.managed.go @@ -0,0 +1,128 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + +// GetCondition of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} diff --git a/apis/organization/v1alpha1/zz_generated.managedlist.go b/apis/organization/v1alpha1/zz_generated.managedlist.go new file mode 100644 index 0000000..69b3dd7 --- /dev/null +++ b/apis/organization/v1alpha1/zz_generated.managedlist.go @@ -0,0 +1,26 @@ +/* +Copyright 2022 Upbound Inc. +*/ +// Code generated by angryjet. DO NOT EDIT. + +package v1alpha1 + +import resource "github.com/crossplane/crossplane-runtime/pkg/resource" + +// GetItems of this OrganizationActionsSecretList. +func (l *OrganizationActionsSecretList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this OrganizationActionsVariableList. +func (l *OrganizationActionsVariableList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} diff --git a/apis/organization/v1alpha1/zz_groupversion_info.go b/apis/organization/v1alpha1/zz_groupversion_info.go new file mode 100755 index 0000000..95e0c63 --- /dev/null +++ b/apis/organization/v1alpha1/zz_groupversion_info.go @@ -0,0 +1,32 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +// +kubebuilder:object:generate=true +// +groupName=organization.github.upbound.io +// +versionName=v1alpha1 +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +// Package type metadata. +const ( + CRDGroup = "organization.github.upbound.io" + CRDVersion = "v1alpha1" +) + +var ( + // CRDGroupVersion is the API Group Version used to register the objects + CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme + SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme +) diff --git a/apis/organization/v1alpha1/zz_organizationactionssecret_terraformed.go b/apis/organization/v1alpha1/zz_organizationactionssecret_terraformed.go new file mode 100755 index 0000000..fa9dafc --- /dev/null +++ b/apis/organization/v1alpha1/zz_organizationactionssecret_terraformed.go @@ -0,0 +1,129 @@ +/* +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 OrganizationActionsSecret +func (mg *OrganizationActionsSecret) GetTerraformResourceType() string { + return "github_actions_organization_secret" +} + +// GetConnectionDetailsMapping for this OrganizationActionsSecret +func (tr *OrganizationActionsSecret) GetConnectionDetailsMapping() map[string]string { + return map[string]string{"encrypted_value": "encryptedValueSecretRef", "plaintext_value": "plaintextValueSecretRef"} +} + +// GetObservation of this OrganizationActionsSecret +func (tr *OrganizationActionsSecret) 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 OrganizationActionsSecret +func (tr *OrganizationActionsSecret) 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 OrganizationActionsSecret +func (tr *OrganizationActionsSecret) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this OrganizationActionsSecret +func (tr *OrganizationActionsSecret) 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 OrganizationActionsSecret +func (tr *OrganizationActionsSecret) 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 OrganizationActionsSecret +func (tr *OrganizationActionsSecret) 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 OrganizationActionsSecret +func (tr *OrganizationActionsSecret) 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 OrganizationActionsSecret using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *OrganizationActionsSecret) LateInitialize(attrs []byte) (bool, error) { + params := &OrganizationActionsSecretParameters{} + 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 *OrganizationActionsSecret) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/organization/v1alpha1/zz_organizationactionssecret_types.go b/apis/organization/v1alpha1/zz_organizationactionssecret_types.go new file mode 100755 index 0000000..999650e --- /dev/null +++ b/apis/organization/v1alpha1/zz_organizationactionssecret_types.go @@ -0,0 +1,159 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type OrganizationActionsSecretInitParameters struct { + + // Encrypted value of the secret using the GitHub public key in Base64 format. + // Encrypted value of the secret using the GitHub public key in Base64 format. + EncryptedValueSecretRef *v1.SecretKeySelector `json:"encryptedValueSecretRef,omitempty" tf:"-"` + + // Plaintext value of the secret to be encrypted + // Plaintext value of the secret to be encrypted. + PlaintextValueSecretRef *v1.SecretKeySelector `json:"plaintextValueSecretRef,omitempty" tf:"-"` + + // Name of the secret + // Name of the secret. + SecretName *string `json:"secretName,omitempty" tf:"secret_name,omitempty"` + + // An array of repository ids that can access the organization secret. + // An array of repository ids that can access the organization secret. + // +listType=set + SelectedRepositoryIds []*int64 `json:"selectedRepositoryIds,omitempty" tf:"selected_repository_ids,omitempty"` + + // Configures the access that repositories have to the organization secret. + // Must be one of all, private, selected. selected_repository_ids is required if set to selected. + // Configures the access that repositories have to the organization secret. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` +} + +type OrganizationActionsSecretObservation struct { + + // Date of actions_secret creation. + // Date of 'actions_secret' creation. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // Name of the secret + // Name of the secret. + SecretName *string `json:"secretName,omitempty" tf:"secret_name,omitempty"` + + // An array of repository ids that can access the organization secret. + // An array of repository ids that can access the organization secret. + // +listType=set + SelectedRepositoryIds []*int64 `json:"selectedRepositoryIds,omitempty" tf:"selected_repository_ids,omitempty"` + + // Date of actions_secret update. + // Date of 'actions_secret' update. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` + + // Configures the access that repositories have to the organization secret. + // Must be one of all, private, selected. selected_repository_ids is required if set to selected. + // Configures the access that repositories have to the organization secret. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` +} + +type OrganizationActionsSecretParameters struct { + + // Encrypted value of the secret using the GitHub public key in Base64 format. + // Encrypted value of the secret using the GitHub public key in Base64 format. + // +kubebuilder:validation:Optional + EncryptedValueSecretRef *v1.SecretKeySelector `json:"encryptedValueSecretRef,omitempty" tf:"-"` + + // Plaintext value of the secret to be encrypted + // Plaintext value of the secret to be encrypted. + // +kubebuilder:validation:Optional + PlaintextValueSecretRef *v1.SecretKeySelector `json:"plaintextValueSecretRef,omitempty" tf:"-"` + + // Name of the secret + // Name of the secret. + // +kubebuilder:validation:Optional + SecretName *string `json:"secretName,omitempty" tf:"secret_name,omitempty"` + + // An array of repository ids that can access the organization secret. + // An array of repository ids that can access the organization secret. + // +kubebuilder:validation:Optional + // +listType=set + SelectedRepositoryIds []*int64 `json:"selectedRepositoryIds,omitempty" tf:"selected_repository_ids,omitempty"` + + // Configures the access that repositories have to the organization secret. + // Must be one of all, private, selected. selected_repository_ids is required if set to selected. + // Configures the access that repositories have to the organization secret. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + // +kubebuilder:validation:Optional + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` +} + +// OrganizationActionsSecretSpec defines the desired state of OrganizationActionsSecret +type OrganizationActionsSecretSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider OrganizationActionsSecretParameters `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 OrganizationActionsSecretInitParameters `json:"initProvider,omitempty"` +} + +// OrganizationActionsSecretStatus defines the observed state of OrganizationActionsSecret. +type OrganizationActionsSecretStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider OrganizationActionsSecretObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// OrganizationActionsSecret is the Schema for the OrganizationActionsSecrets API. Creates and manages an Action Secret within a GitHub organization +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].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:resource:scope=Cluster,categories={crossplane,managed,github} +type OrganizationActionsSecret struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,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" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.visibility) || (has(self.initProvider) && has(self.initProvider.visibility))",message="spec.forProvider.visibility is a required parameter" + Spec OrganizationActionsSecretSpec `json:"spec"` + Status OrganizationActionsSecretStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// OrganizationActionsSecretList contains a list of OrganizationActionsSecrets +type OrganizationActionsSecretList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OrganizationActionsSecret `json:"items"` +} + +// Repository type metadata. +var ( + OrganizationActionsSecret_Kind = "OrganizationActionsSecret" + OrganizationActionsSecret_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: OrganizationActionsSecret_Kind}.String() + OrganizationActionsSecret_KindAPIVersion = OrganizationActionsSecret_Kind + "." + CRDGroupVersion.String() + OrganizationActionsSecret_GroupVersionKind = CRDGroupVersion.WithKind(OrganizationActionsSecret_Kind) +) + +func init() { + SchemeBuilder.Register(&OrganizationActionsSecret{}, &OrganizationActionsSecretList{}) +} diff --git a/apis/organization/v1alpha1/zz_organizationactionsvariable_terraformed.go b/apis/organization/v1alpha1/zz_organizationactionsvariable_terraformed.go new file mode 100755 index 0000000..38c25c4 --- /dev/null +++ b/apis/organization/v1alpha1/zz_organizationactionsvariable_terraformed.go @@ -0,0 +1,129 @@ +/* +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 OrganizationActionsVariable +func (mg *OrganizationActionsVariable) GetTerraformResourceType() string { + return "github_actions_organization_variable" +} + +// GetConnectionDetailsMapping for this OrganizationActionsVariable +func (tr *OrganizationActionsVariable) GetConnectionDetailsMapping() map[string]string { + return nil +} + +// GetObservation of this OrganizationActionsVariable +func (tr *OrganizationActionsVariable) 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 OrganizationActionsVariable +func (tr *OrganizationActionsVariable) 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 OrganizationActionsVariable +func (tr *OrganizationActionsVariable) GetID() string { + if tr.Status.AtProvider.ID == nil { + return "" + } + return *tr.Status.AtProvider.ID +} + +// GetParameters of this OrganizationActionsVariable +func (tr *OrganizationActionsVariable) 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 OrganizationActionsVariable +func (tr *OrganizationActionsVariable) 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 OrganizationActionsVariable +func (tr *OrganizationActionsVariable) 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 OrganizationActionsVariable +func (tr *OrganizationActionsVariable) 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 OrganizationActionsVariable using its observed tfState. +// returns True if there are any spec changes for the resource. +func (tr *OrganizationActionsVariable) LateInitialize(attrs []byte) (bool, error) { + params := &OrganizationActionsVariableParameters{} + 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 *OrganizationActionsVariable) GetTerraformSchemaVersion() int { + return 0 +} diff --git a/apis/organization/v1alpha1/zz_organizationactionsvariable_types.go b/apis/organization/v1alpha1/zz_organizationactionsvariable_types.go new file mode 100755 index 0000000..57b33c1 --- /dev/null +++ b/apis/organization/v1alpha1/zz_organizationactionsvariable_types.go @@ -0,0 +1,155 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package v1alpha1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + + v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" +) + +type OrganizationActionsVariableInitParameters struct { + + // An array of repository ids that can access the organization variable. + // An array of repository ids that can access the organization variable. + // +listType=set + SelectedRepositoryIds []*int64 `json:"selectedRepositoryIds,omitempty" tf:"selected_repository_ids,omitempty"` + + // Value of the variable + // Value of the variable. + Value *string `json:"value,omitempty" tf:"value,omitempty"` + + // Name of the variable + // Name of the variable. + VariableName *string `json:"variableName,omitempty" tf:"variable_name,omitempty"` + + // Configures the access that repositories have to the organization variable. + // Must be one of all, private, selected. selected_repository_ids is required if set to selected. + // Configures the access that repositories have to the organization variable. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` +} + +type OrganizationActionsVariableObservation struct { + + // Date of actions_variable creation. + // Date of 'actions_variable' creation. + CreatedAt *string `json:"createdAt,omitempty" tf:"created_at,omitempty"` + + ID *string `json:"id,omitempty" tf:"id,omitempty"` + + // An array of repository ids that can access the organization variable. + // An array of repository ids that can access the organization variable. + // +listType=set + SelectedRepositoryIds []*int64 `json:"selectedRepositoryIds,omitempty" tf:"selected_repository_ids,omitempty"` + + // Date of actions_variable update. + // Date of 'actions_variable' update. + UpdatedAt *string `json:"updatedAt,omitempty" tf:"updated_at,omitempty"` + + // Value of the variable + // Value of the variable. + Value *string `json:"value,omitempty" tf:"value,omitempty"` + + // Name of the variable + // Name of the variable. + VariableName *string `json:"variableName,omitempty" tf:"variable_name,omitempty"` + + // Configures the access that repositories have to the organization variable. + // Must be one of all, private, selected. selected_repository_ids is required if set to selected. + // Configures the access that repositories have to the organization variable. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` +} + +type OrganizationActionsVariableParameters struct { + + // An array of repository ids that can access the organization variable. + // An array of repository ids that can access the organization variable. + // +kubebuilder:validation:Optional + // +listType=set + SelectedRepositoryIds []*int64 `json:"selectedRepositoryIds,omitempty" tf:"selected_repository_ids,omitempty"` + + // Value of the variable + // Value of the variable. + // +kubebuilder:validation:Optional + Value *string `json:"value,omitempty" tf:"value,omitempty"` + + // Name of the variable + // Name of the variable. + // +kubebuilder:validation:Optional + VariableName *string `json:"variableName,omitempty" tf:"variable_name,omitempty"` + + // Configures the access that repositories have to the organization variable. + // Must be one of all, private, selected. selected_repository_ids is required if set to selected. + // Configures the access that repositories have to the organization variable. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + // +kubebuilder:validation:Optional + Visibility *string `json:"visibility,omitempty" tf:"visibility,omitempty"` +} + +// OrganizationActionsVariableSpec defines the desired state of OrganizationActionsVariable +type OrganizationActionsVariableSpec struct { + v1.ResourceSpec `json:",inline"` + ForProvider OrganizationActionsVariableParameters `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 OrganizationActionsVariableInitParameters `json:"initProvider,omitempty"` +} + +// OrganizationActionsVariableStatus defines the observed state of OrganizationActionsVariable. +type OrganizationActionsVariableStatus struct { + v1.ResourceStatus `json:",inline"` + AtProvider OrganizationActionsVariableObservation `json:"atProvider,omitempty"` +} + +// +kubebuilder:object:root=true +// +kubebuilder:subresource:status +// +kubebuilder:storageversion + +// OrganizationActionsVariable is the Schema for the OrganizationActionsVariables API. Creates and manages an Action variable within a GitHub organization +// +kubebuilder:printcolumn:name="SYNCED",type="string",JSONPath=".status.conditions[?(@.type=='Synced')].status" +// +kubebuilder:printcolumn:name="READY",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].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:resource:scope=Cluster,categories={crossplane,managed,github} +type OrganizationActionsVariable struct { + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata,omitempty"` + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.variableName) || (has(self.initProvider) && has(self.initProvider.variableName))",message="spec.forProvider.variableName is a required parameter" + // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.visibility) || (has(self.initProvider) && has(self.initProvider.visibility))",message="spec.forProvider.visibility is a required parameter" + Spec OrganizationActionsVariableSpec `json:"spec"` + Status OrganizationActionsVariableStatus `json:"status,omitempty"` +} + +// +kubebuilder:object:root=true + +// OrganizationActionsVariableList contains a list of OrganizationActionsVariables +type OrganizationActionsVariableList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []OrganizationActionsVariable `json:"items"` +} + +// Repository type metadata. +var ( + OrganizationActionsVariable_Kind = "OrganizationActionsVariable" + OrganizationActionsVariable_GroupKind = schema.GroupKind{Group: CRDGroup, Kind: OrganizationActionsVariable_Kind}.String() + OrganizationActionsVariable_KindAPIVersion = OrganizationActionsVariable_Kind + "." + CRDGroupVersion.String() + OrganizationActionsVariable_GroupVersionKind = CRDGroupVersion.WithKind(OrganizationActionsVariable_Kind) +) + +func init() { + SchemeBuilder.Register(&OrganizationActionsVariable{}, &OrganizationActionsVariableList{}) +} diff --git a/apis/zz_register.go b/apis/zz_register.go index 3aafc93..bc33351 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -12,6 +12,7 @@ import ( v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/actions/v1alpha1" v1alpha1enterprise "github.com/crossplane-contrib/provider-upjet-github/apis/enterprise/v1alpha1" + v1alpha1organization "github.com/crossplane-contrib/provider-upjet-github/apis/organization/v1alpha1" v1alpha1repo "github.com/crossplane-contrib/provider-upjet-github/apis/repo/v1alpha1" v1alpha1team "github.com/crossplane-contrib/provider-upjet-github/apis/team/v1alpha1" v1alpha1user "github.com/crossplane-contrib/provider-upjet-github/apis/user/v1alpha1" @@ -24,6 +25,7 @@ func init() { AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme, v1alpha1enterprise.SchemeBuilder.AddToScheme, + v1alpha1organization.SchemeBuilder.AddToScheme, v1alpha1repo.SchemeBuilder.AddToScheme, v1alpha1team.SchemeBuilder.AddToScheme, v1alpha1user.SchemeBuilder.AddToScheme, diff --git a/config/external_name.go b/config/external_name.go index fbcfd6e..da30850 100644 --- a/config/external_name.go +++ b/config/external_name.go @@ -45,10 +45,12 @@ var terraformPluginSDKExternalNameConfigs = map[string]config.ExternalName{ // Can be imported using the following format: {{ repository }}/{{ id }}. "github_repository_webhook": config.IdentifierFromProvider, // This cannot be imported. - "github_actions_secret": config.IdentifierFromProvider, - "github_actions_variable": config.IdentifierFromProvider, - "github_enterprise_organization": config.IdentifierFromProvider, - "github_organization_ruleset": config.IdentifierFromProvider, + "github_actions_secret": config.IdentifierFromProvider, + "github_actions_variable": config.IdentifierFromProvider, + "github_actions_organization_secret": config.IdentifierFromProvider, + "github_actions_organization_variable": config.IdentifierFromProvider, + "github_enterprise_organization": config.IdentifierFromProvider, + "github_organization_ruleset": config.IdentifierFromProvider, // Can be imported using the following format: {{ repository }}/{{ id }} or {{ key_prefix }}. "github_repository_autolink_reference": config.IdentifierFromProvider, // Can be imported using the following format: {{ repository }}:{{ username }}. diff --git a/config/organizationactionssecret/config.go b/config/organizationactionssecret/config.go new file mode 100644 index 0000000..030ec81 --- /dev/null +++ b/config/organizationactionssecret/config.go @@ -0,0 +1,13 @@ +package organizationactionssecret + +import "github.com/crossplane/upjet/pkg/config" + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("github_actions_organization_secret", func(r *config.Resource) { + // We need to override the default group that upjet generated for + // this resource, which would be "github" + r.Kind = "OrganizationActionsSecret" + r.ShortGroup = "organization" + }) +} diff --git a/config/organizationactionsvariable/config.go b/config/organizationactionsvariable/config.go new file mode 100644 index 0000000..69e286e --- /dev/null +++ b/config/organizationactionsvariable/config.go @@ -0,0 +1,13 @@ +package organizationactionsvariable + +import "github.com/crossplane/upjet/pkg/config" + +// Configure configures individual resources by adding custom ResourceConfigurators. +func Configure(p *config.Provider) { + p.AddResourceConfigurator("github_actions_organization_variable", func(r *config.Resource) { + // We need to override the default group that upjet generated for + // this resource, which would be "github" + r.Kind = "OrganizationActionsVariable" + r.ShortGroup = "organization" + }) +} diff --git a/config/provider.go b/config/provider.go index 62cf9c8..0753ee5 100644 --- a/config/provider.go +++ b/config/provider.go @@ -19,6 +19,8 @@ import ( "github.com/crossplane-contrib/provider-upjet-github/config/emugroupmapping" "github.com/crossplane-contrib/provider-upjet-github/config/membership" "github.com/crossplane-contrib/provider-upjet-github/config/organization" + "github.com/crossplane-contrib/provider-upjet-github/config/organizationactionssecret" + "github.com/crossplane-contrib/provider-upjet-github/config/organizationactionsvariable" "github.com/crossplane-contrib/provider-upjet-github/config/organizationruleset" "github.com/crossplane-contrib/provider-upjet-github/config/pullrequest" "github.com/crossplane-contrib/provider-upjet-github/config/repository" @@ -88,6 +90,8 @@ func GetProvider(ctx context.Context) (*ujconfig.Provider, error) { membership.Configure, teamsettings.Configure, teamsyncgroupmapping.Configure, + organizationactionssecret.Configure, + organizationactionsvariable.Configure, } { configure(pc) } diff --git a/examples-generated/organization/v1alpha1/organizationactionssecret.yaml b/examples-generated/organization/v1alpha1/organizationactionssecret.yaml new file mode 100644 index 0000000..8d7133b --- /dev/null +++ b/examples-generated/organization/v1alpha1/organizationactionssecret.yaml @@ -0,0 +1,16 @@ +apiVersion: organization.github.upbound.io/v1alpha1 +kind: OrganizationActionsSecret +metadata: + annotations: + meta.upbound.io/example-id: organization/v1alpha1/organizationactionssecret + labels: + testing.upbound.io/example-name: example_secret + name: example-secret +spec: + forProvider: + plaintextValueSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + secretName: example_secret_name + visibility: private diff --git a/examples-generated/organization/v1alpha1/organizationactionsvariable.yaml b/examples-generated/organization/v1alpha1/organizationactionsvariable.yaml new file mode 100644 index 0000000..7449b13 --- /dev/null +++ b/examples-generated/organization/v1alpha1/organizationactionsvariable.yaml @@ -0,0 +1,13 @@ +apiVersion: organization.github.upbound.io/v1alpha1 +kind: OrganizationActionsVariable +metadata: + annotations: + meta.upbound.io/example-id: organization/v1alpha1/organizationactionsvariable + labels: + testing.upbound.io/example-name: example_variable + name: example-variable +spec: + forProvider: + value: example_variable_value + variableName: example_variable_name + visibility: private diff --git a/internal/controller/organization/organizationactionssecret/zz_controller.go b/internal/controller/organization/organizationactionssecret/zz_controller.go new file mode 100755 index 0000000..a37fcd7 --- /dev/null +++ b/internal/controller/organization/organizationactionssecret/zz_controller.go @@ -0,0 +1,91 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package organizationactionssecret + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/organization/v1alpha1" + features "github.com/crossplane-contrib/provider-upjet-github/internal/features" +) + +// Setup adds a controller that reconciles OrganizationActionsSecret managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.OrganizationActionsSecret_GroupVersionKind.String()) + 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, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.OrganizationActionsSecret_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrganizationActionsSecret_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewTerraformPluginSDKAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["github_actions_organization_secret"], + tjcontroller.WithTerraformPluginSDKAsyncLogger(o.Logger), + tjcontroller.WithTerraformPluginSDKAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithTerraformPluginSDKAsyncCallbackProvider(ac), + tjcontroller.WithTerraformPluginSDKAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.OrganizationActionsSecret_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithTerraformPluginSDKAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewOperationTrackerFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + 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()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.OrganizationActionsSecret + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.OrganizationActionsSecret{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.OrganizationActionsSecret") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.OrganizationActionsSecretList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.OrganizationActionsSecretList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrganizationActionsSecret_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.OrganizationActionsSecret{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/organization/organizationactionsvariable/zz_controller.go b/internal/controller/organization/organizationactionsvariable/zz_controller.go new file mode 100755 index 0000000..4ea0792 --- /dev/null +++ b/internal/controller/organization/organizationactionsvariable/zz_controller.go @@ -0,0 +1,91 @@ +/* +Copyright 2022 Upbound Inc. +*/ + +// Code generated by upjet. DO NOT EDIT. + +package organizationactionsvariable + +import ( + "time" + + "github.com/crossplane/crossplane-runtime/pkg/connection" + "github.com/crossplane/crossplane-runtime/pkg/event" + "github.com/crossplane/crossplane-runtime/pkg/ratelimiter" + "github.com/crossplane/crossplane-runtime/pkg/reconciler/managed" + xpresource "github.com/crossplane/crossplane-runtime/pkg/resource" + "github.com/crossplane/crossplane-runtime/pkg/statemetrics" + tjcontroller "github.com/crossplane/upjet/pkg/controller" + "github.com/crossplane/upjet/pkg/controller/handler" + "github.com/crossplane/upjet/pkg/metrics" + "github.com/pkg/errors" + ctrl "sigs.k8s.io/controller-runtime" + + v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/organization/v1alpha1" + features "github.com/crossplane-contrib/provider-upjet-github/internal/features" +) + +// Setup adds a controller that reconciles OrganizationActionsVariable managed resources. +func Setup(mgr ctrl.Manager, o tjcontroller.Options) error { + name := managed.ControllerName(v1alpha1.OrganizationActionsVariable_GroupVersionKind.String()) + 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, connection.WithTLSConfig(o.ESSOptions.TLSConfig))) + } + eventHandler := handler.NewEventHandler(handler.WithLogger(o.Logger.WithValues("gvk", v1alpha1.OrganizationActionsVariable_GroupVersionKind))) + ac := tjcontroller.NewAPICallbacks(mgr, xpresource.ManagedKind(v1alpha1.OrganizationActionsVariable_GroupVersionKind), tjcontroller.WithEventHandler(eventHandler), tjcontroller.WithStatusUpdates(false)) + opts := []managed.ReconcilerOption{ + managed.WithExternalConnecter( + tjcontroller.NewTerraformPluginSDKAsyncConnector(mgr.GetClient(), o.OperationTrackerStore, o.SetupFn, o.Provider.Resources["github_actions_organization_variable"], + tjcontroller.WithTerraformPluginSDKAsyncLogger(o.Logger), + tjcontroller.WithTerraformPluginSDKAsyncConnectorEventHandler(eventHandler), + tjcontroller.WithTerraformPluginSDKAsyncCallbackProvider(ac), + tjcontroller.WithTerraformPluginSDKAsyncMetricRecorder(metrics.NewMetricRecorder(v1alpha1.OrganizationActionsVariable_GroupVersionKind, mgr, o.PollInterval)), + tjcontroller.WithTerraformPluginSDKAsyncManagementPolicies(o.Features.Enabled(features.EnableBetaManagementPolicies)))), + managed.WithLogger(o.Logger.WithValues("controller", name)), + managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name))), + managed.WithFinalizer(tjcontroller.NewOperationTrackerFinalizer(o.OperationTrackerStore, xpresource.NewAPIFinalizer(mgr.GetClient(), managed.FinalizerName))), + 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()) + } + if o.MetricOptions != nil { + opts = append(opts, managed.WithMetricRecorder(o.MetricOptions.MRMetrics)) + } + + // register webhooks for the kind v1alpha1.OrganizationActionsVariable + // if they're enabled. + if o.StartWebhooks { + if err := ctrl.NewWebhookManagedBy(mgr). + For(&v1alpha1.OrganizationActionsVariable{}). + Complete(); err != nil { + return errors.Wrap(err, "cannot register webhook for the kind v1alpha1.OrganizationActionsVariable") + } + } + + if o.MetricOptions != nil && o.MetricOptions.MRStateMetrics != nil { + stateMetricsRecorder := statemetrics.NewMRStateRecorder( + mgr.GetClient(), o.Logger, o.MetricOptions.MRStateMetrics, &v1alpha1.OrganizationActionsVariableList{}, o.MetricOptions.PollStateMetricInterval, + ) + if err := mgr.Add(stateMetricsRecorder); err != nil { + return errors.Wrap(err, "cannot register MR state metrics recorder for kind v1alpha1.OrganizationActionsVariableList") + } + } + + r := managed.NewReconciler(mgr, xpresource.ManagedKind(v1alpha1.OrganizationActionsVariable_GroupVersionKind), opts...) + + return ctrl.NewControllerManagedBy(mgr). + Named(name). + WithOptions(o.ForControllerRuntime()). + WithEventFilter(xpresource.DesiredStateChanged()). + Watches(&v1alpha1.OrganizationActionsVariable{}, eventHandler). + Complete(ratelimiter.NewReconciler(name, r, o.GlobalRateLimiter)) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 3441051..0b42cc7 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -14,6 +14,8 @@ import ( runnergroup "github.com/crossplane-contrib/provider-upjet-github/internal/controller/actions/runnergroup" organization "github.com/crossplane-contrib/provider-upjet-github/internal/controller/enterprise/organization" organizationruleset "github.com/crossplane-contrib/provider-upjet-github/internal/controller/enterprise/organizationruleset" + organizationactionssecret "github.com/crossplane-contrib/provider-upjet-github/internal/controller/organization/organizationactionssecret" + organizationactionsvariable "github.com/crossplane-contrib/provider-upjet-github/internal/controller/organization/organizationactionsvariable" providerconfig "github.com/crossplane-contrib/provider-upjet-github/internal/controller/providerconfig" branch "github.com/crossplane-contrib/provider-upjet-github/internal/controller/repo/branch" branchprotection "github.com/crossplane-contrib/provider-upjet-github/internal/controller/repo/branchprotection" @@ -45,6 +47,8 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { runnergroup.Setup, organization.Setup, organizationruleset.Setup, + organizationactionssecret.Setup, + organizationactionsvariable.Setup, providerconfig.Setup, branch.Setup, branchprotection.Setup, diff --git a/package/crds/organization.github.upbound.io_organizationactionssecrets.yaml b/package/crds/organization.github.upbound.io_organizationactionssecrets.yaml new file mode 100644 index 0000000..e226485 --- /dev/null +++ b/package/crds/organization.github.upbound.io_organizationactionssecrets.yaml @@ -0,0 +1,483 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: organizationactionssecrets.organization.github.upbound.io +spec: + group: organization.github.upbound.io + names: + categories: + - crossplane + - managed + - github + kind: OrganizationActionsSecret + listKind: OrganizationActionsSecretList + plural: organizationactionssecrets + singular: organizationactionssecret + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + 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: OrganizationActionsSecret is the Schema for the OrganizationActionsSecrets + API. Creates and manages an Action Secret within a GitHub organization + 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: OrganizationActionsSecretSpec defines the desired state of + OrganizationActionsSecret + 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: + encryptedValueSecretRef: + description: |- + Encrypted value of the secret using the GitHub public key in Base64 format. + Encrypted value of the secret using the GitHub public key in Base64 format. + 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 + plaintextValueSecretRef: + description: |- + Plaintext value of the secret to be encrypted + Plaintext value of the secret to be encrypted. + 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 + secretName: + description: |- + Name of the secret + Name of the secret. + type: string + selectedRepositoryIds: + description: |- + An array of repository ids that can access the organization secret. + An array of repository ids that can access the organization secret. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: set + visibility: + description: |- + Configures the access that repositories have to the organization secret. + Must be one of all, private, selected. selected_repository_ids is required if set to selected. + Configures the access that repositories have to the organization secret. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + 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: + encryptedValueSecretRef: + description: |- + Encrypted value of the secret using the GitHub public key in Base64 format. + Encrypted value of the secret using the GitHub public key in Base64 format. + 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 + plaintextValueSecretRef: + description: |- + Plaintext value of the secret to be encrypted + Plaintext value of the secret to be encrypted. + 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 + secretName: + description: |- + Name of the secret + Name of the secret. + type: string + selectedRepositoryIds: + description: |- + An array of repository ids that can access the organization secret. + An array of repository ids that can access the organization secret. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: set + visibility: + description: |- + Configures the access that repositories have to the organization secret. + Must be one of all, private, selected. selected_repository_ids is required if set to selected. + Configures the access that repositories have to the organization secret. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + 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 + 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.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))' + - message: spec.forProvider.visibility is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.visibility) + || (has(self.initProvider) && has(self.initProvider.visibility))' + status: + description: OrganizationActionsSecretStatus defines the observed state + of OrganizationActionsSecret. + properties: + atProvider: + properties: + createdAt: + description: |- + Date of actions_secret creation. + Date of 'actions_secret' creation. + type: string + id: + type: string + secretName: + description: |- + Name of the secret + Name of the secret. + type: string + selectedRepositoryIds: + description: |- + An array of repository ids that can access the organization secret. + An array of repository ids that can access the organization secret. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: set + updatedAt: + description: |- + Date of actions_secret update. + Date of 'actions_secret' update. + type: string + visibility: + description: |- + Configures the access that repositories have to the organization secret. + Must be one of all, private, selected. selected_repository_ids is required if set to selected. + Configures the access that repositories have to the organization secret. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + 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 + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + 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 + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/package/crds/organization.github.upbound.io_organizationactionsvariables.yaml b/package/crds/organization.github.upbound.io_organizationactionsvariables.yaml new file mode 100644 index 0000000..5dffbcf --- /dev/null +++ b/package/crds/organization.github.upbound.io_organizationactionsvariables.yaml @@ -0,0 +1,426 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.14.0 + name: organizationactionsvariables.organization.github.upbound.io +spec: + group: organization.github.upbound.io + names: + categories: + - crossplane + - managed + - github + kind: OrganizationActionsVariable + listKind: OrganizationActionsVariableList + plural: organizationactionsvariables + singular: organizationactionsvariable + scope: Cluster + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Synced')].status + name: SYNCED + type: string + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + 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: OrganizationActionsVariable is the Schema for the OrganizationActionsVariables + API. Creates and manages an Action variable within a GitHub organization + 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: OrganizationActionsVariableSpec defines the desired state + of OrganizationActionsVariable + 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: + selectedRepositoryIds: + description: |- + An array of repository ids that can access the organization variable. + An array of repository ids that can access the organization variable. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: set + value: + description: |- + Value of the variable + Value of the variable. + type: string + variableName: + description: |- + Name of the variable + Name of the variable. + type: string + visibility: + description: |- + Configures the access that repositories have to the organization variable. + Must be one of all, private, selected. selected_repository_ids is required if set to selected. + Configures the access that repositories have to the organization variable. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + 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: + selectedRepositoryIds: + description: |- + An array of repository ids that can access the organization variable. + An array of repository ids that can access the organization variable. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: set + value: + description: |- + Value of the variable + Value of the variable. + type: string + variableName: + description: |- + Name of the variable + Name of the variable. + type: string + visibility: + description: |- + Configures the access that repositories have to the organization variable. + Must be one of all, private, selected. selected_repository_ids is required if set to selected. + Configures the access that repositories have to the organization variable. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + 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 + 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.value is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.value) + || (has(self.initProvider) && has(self.initProvider.value))' + - message: spec.forProvider.variableName is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.variableName) + || (has(self.initProvider) && has(self.initProvider.variableName))' + - message: spec.forProvider.visibility is a required parameter + rule: '!(''*'' in self.managementPolicies || ''Create'' in self.managementPolicies + || ''Update'' in self.managementPolicies) || has(self.forProvider.visibility) + || (has(self.initProvider) && has(self.initProvider.visibility))' + status: + description: OrganizationActionsVariableStatus defines the observed state + of OrganizationActionsVariable. + properties: + atProvider: + properties: + createdAt: + description: |- + Date of actions_variable creation. + Date of 'actions_variable' creation. + type: string + id: + type: string + selectedRepositoryIds: + description: |- + An array of repository ids that can access the organization variable. + An array of repository ids that can access the organization variable. + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: set + updatedAt: + description: |- + Date of actions_variable update. + Date of 'actions_variable' update. + type: string + value: + description: |- + Value of the variable + Value of the variable. + type: string + variableName: + description: |- + Name of the variable + Name of the variable. + type: string + visibility: + description: |- + Configures the access that repositories have to the organization variable. + Must be one of all, private, selected. selected_repository_ids is required if set to selected. + Configures the access that repositories have to the organization variable. Must be one of 'all', 'private', or 'selected'. 'selected_repository_ids' is required if set to 'selected'. + 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 + observedGeneration: + description: |- + ObservedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + type: integer + 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 + observedGeneration: + description: |- + ObservedGeneration is the latest metadata.generation + which resulted in either a ready state, or stalled due to error + it can not recover from without human intervention. + format: int64 + type: integer + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} diff --git a/tests/cases/organization-actions-secret/secret.yaml b/tests/cases/organization-actions-secret/secret.yaml new file mode 100644 index 0000000..872979c --- /dev/null +++ b/tests/cases/organization-actions-secret/secret.yaml @@ -0,0 +1,20 @@ +apiVersion: actions.github.upbound.io/v1alpha1 +kind: OrganizationActionsSecret +metadata: + name: organization-secret-test +spec: + forProvider: + secretName: TEST_SECRET + plaintextValueSecretRef: + key: howdy + name: organization-secret-secret + namespace: default + providerConfigRef: + name: default +--- +apiVersion: v1 +kind: Secret +metadata: + name: organization-secret-secret +stringData: + howdy: a-secret-text diff --git a/tests/cases/organization-actions-variable/variable.yaml b/tests/cases/organization-actions-variable/variable.yaml new file mode 100644 index 0000000..ca2afae --- /dev/null +++ b/tests/cases/organization-actions-variable/variable.yaml @@ -0,0 +1,9 @@ +apiVersion: actions.github.upbound.io/v1alpha1 +kind: OrganizationActionsVariable +metadata: + name: organization-variable-test +spec: + forProvider: + value: "My variable value" + variableName: TEST_VARIABLE + visibility: private From f29658ed6e532c024c10790ec3dea8643b6306bd Mon Sep 17 00:00:00 2001 From: Thorsten Gilfert Date: Mon, 6 Jan 2025 17:17:44 +0100 Subject: [PATCH 2/4] Change API group to "actions" Signed-off-by: Thorsten Gilfert --- README.md | 4 +- .../v1alpha1/zz_generated.conversion_hubs.go | 6 + .../actions/v1alpha1/zz_generated.deepcopy.go | 469 +++++++++++++++++ apis/actions/v1alpha1/zz_generated.managed.go | 120 +++++ .../v1alpha1/zz_generated.managedlist.go | 18 + ...z_organizationactionssecret_terraformed.go | 0 .../zz_organizationactionssecret_types.go | 0 ...organizationactionsvariable_terraformed.go | 0 .../zz_organizationactionsvariable_types.go | 0 .../v1alpha1/zz_generated.conversion_hubs.go | 13 - .../v1alpha1/zz_generated.deepcopy.go | 483 ------------------ .../v1alpha1/zz_generated.managed.go | 128 ----- .../v1alpha1/zz_generated.managedlist.go | 26 - .../v1alpha1/zz_groupversion_info.go | 32 -- apis/zz_register.go | 2 - config/organizationactionssecret/config.go | 2 +- config/organizationactionsvariable/config.go | 2 +- .../v1alpha1/organizationactionssecret.yaml | 4 +- .../v1alpha1/organizationactionsvariable.yaml | 4 +- .../organizationactionssecret.yaml | 20 + .../zz_controller.go | 2 +- .../zz_controller.go | 2 +- internal/controller/zz_setup.go | 8 +- ...pbound.io_organizationactionssecrets.yaml} | 4 +- ...ound.io_organizationactionsvariables.yaml} | 4 +- 25 files changed, 652 insertions(+), 701 deletions(-) rename apis/{organization => actions}/v1alpha1/zz_organizationactionssecret_terraformed.go (100%) rename apis/{organization => actions}/v1alpha1/zz_organizationactionssecret_types.go (100%) rename apis/{organization => actions}/v1alpha1/zz_organizationactionsvariable_terraformed.go (100%) rename apis/{organization => actions}/v1alpha1/zz_organizationactionsvariable_types.go (100%) delete mode 100755 apis/organization/v1alpha1/zz_generated.conversion_hubs.go delete mode 100644 apis/organization/v1alpha1/zz_generated.deepcopy.go delete mode 100644 apis/organization/v1alpha1/zz_generated.managed.go delete mode 100644 apis/organization/v1alpha1/zz_generated.managedlist.go delete mode 100755 apis/organization/v1alpha1/zz_groupversion_info.go rename examples-generated/{organization => actions}/v1alpha1/organizationactionssecret.yaml (71%) rename examples-generated/{organization => actions}/v1alpha1/organizationactionsvariable.yaml (66%) create mode 100644 examples/organization/organizationactionssecret.yaml rename internal/controller/{organization => actions}/organizationactionssecret/zz_controller.go (99%) rename internal/controller/{organization => actions}/organizationactionsvariable/zz_controller.go (99%) rename package/crds/{organization.github.upbound.io_organizationactionssecrets.yaml => actions.github.upbound.io_organizationactionssecrets.yaml} (99%) rename package/crds/{organization.github.upbound.io_organizationactionsvariables.yaml => actions.github.upbound.io_organizationactionsvariables.yaml} (99%) diff --git a/README.md b/README.md index 8ea9f03..c16dd09 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,9 @@ spec: | `TeamSettings` | `team` | `github_team_settings` | | | `TeamSyncGroupMapping` | `team` | `github_team_sync_group_mapping` | | | `EmuTeamMapping` | `team` | `github_emu_group_mapping` | | -| `ActionsSecrets` | `actions` | `github_actions_secret` | | +| `ActionsSecret` | `actions` | `github_actions_secret` | | +| `OrganizationActionsSecret` | `actions` | `github_organization_actions_secret` | | +| `OrganizationActionsVariable` | `actions` | `github_organization_actions_variable` | | | `OrganizationRuleset` | `organization` | `github_organization_ruleset` | | | `Membership` | `user` | `github_membership` | Works only with - GitHub App user access tokens - GitHub App installation access tokens - Fine-grained personal access tokens using a token with at least `members:read` | | `Organization` | `enterprise` | `github_enterprise_organization` | Works only with PAT based authentication using a token with at least `admin:enterprise` scope.
The following *GraphQL* query can be used to obtain the required `enterprise_id`:
`gh api graphql -f query='query ($slug: String!) { enterprise(slug: $slug) { id } }' -F slug='' --jq '.data.enterprise.id'` | diff --git a/apis/actions/v1alpha1/zz_generated.conversion_hubs.go b/apis/actions/v1alpha1/zz_generated.conversion_hubs.go index e187296..d95a150 100755 --- a/apis/actions/v1alpha1/zz_generated.conversion_hubs.go +++ b/apis/actions/v1alpha1/zz_generated.conversion_hubs.go @@ -12,5 +12,11 @@ func (tr *ActionsSecret) Hub() {} // Hub marks this type as a conversion hub. func (tr *ActionsVariable) Hub() {} +// Hub marks this type as a conversion hub. +func (tr *OrganizationActionsSecret) Hub() {} + +// Hub marks this type as a conversion hub. +func (tr *OrganizationActionsVariable) Hub() {} + // Hub marks this type as a conversion hub. func (tr *RunnerGroup) Hub() {} diff --git a/apis/actions/v1alpha1/zz_generated.deepcopy.go b/apis/actions/v1alpha1/zz_generated.deepcopy.go index b5df59f..bfea3c7 100644 --- a/apis/actions/v1alpha1/zz_generated.deepcopy.go +++ b/apis/actions/v1alpha1/zz_generated.deepcopy.go @@ -456,6 +456,475 @@ func (in *ActionsVariableStatus) DeepCopy() *ActionsVariableStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecret) DeepCopyInto(out *OrganizationActionsSecret) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecret. +func (in *OrganizationActionsSecret) DeepCopy() *OrganizationActionsSecret { + if in == nil { + return nil + } + out := new(OrganizationActionsSecret) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsSecret) 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 *OrganizationActionsSecretInitParameters) DeepCopyInto(out *OrganizationActionsSecretInitParameters) { + *out = *in + if in.EncryptedValueSecretRef != nil { + in, out := &in.EncryptedValueSecretRef, &out.EncryptedValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.PlaintextValueSecretRef != nil { + in, out := &in.PlaintextValueSecretRef, &out.PlaintextValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretInitParameters. +func (in *OrganizationActionsSecretInitParameters) DeepCopy() *OrganizationActionsSecretInitParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretList) DeepCopyInto(out *OrganizationActionsSecretList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OrganizationActionsSecret, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretList. +func (in *OrganizationActionsSecretList) DeepCopy() *OrganizationActionsSecretList { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsSecretList) 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 *OrganizationActionsSecretObservation) DeepCopyInto(out *OrganizationActionsSecretObservation) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretObservation. +func (in *OrganizationActionsSecretObservation) DeepCopy() *OrganizationActionsSecretObservation { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretParameters) DeepCopyInto(out *OrganizationActionsSecretParameters) { + *out = *in + if in.EncryptedValueSecretRef != nil { + in, out := &in.EncryptedValueSecretRef, &out.EncryptedValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.PlaintextValueSecretRef != nil { + in, out := &in.PlaintextValueSecretRef, &out.PlaintextValueSecretRef + *out = new(v1.SecretKeySelector) + **out = **in + } + if in.SecretName != nil { + in, out := &in.SecretName, &out.SecretName + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretParameters. +func (in *OrganizationActionsSecretParameters) DeepCopy() *OrganizationActionsSecretParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretSpec) DeepCopyInto(out *OrganizationActionsSecretSpec) { + *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 OrganizationActionsSecretSpec. +func (in *OrganizationActionsSecretSpec) DeepCopy() *OrganizationActionsSecretSpec { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsSecretStatus) DeepCopyInto(out *OrganizationActionsSecretStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretStatus. +func (in *OrganizationActionsSecretStatus) DeepCopy() *OrganizationActionsSecretStatus { + if in == nil { + return nil + } + out := new(OrganizationActionsSecretStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariable) DeepCopyInto(out *OrganizationActionsVariable) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariable. +func (in *OrganizationActionsVariable) DeepCopy() *OrganizationActionsVariable { + if in == nil { + return nil + } + out := new(OrganizationActionsVariable) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsVariable) 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 *OrganizationActionsVariableInitParameters) DeepCopyInto(out *OrganizationActionsVariableInitParameters) { + *out = *in + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + if in.VariableName != nil { + in, out := &in.VariableName, &out.VariableName + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableInitParameters. +func (in *OrganizationActionsVariableInitParameters) DeepCopy() *OrganizationActionsVariableInitParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableInitParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableList) DeepCopyInto(out *OrganizationActionsVariableList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]OrganizationActionsVariable, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableList. +func (in *OrganizationActionsVariableList) DeepCopy() *OrganizationActionsVariableList { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *OrganizationActionsVariableList) 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 *OrganizationActionsVariableObservation) DeepCopyInto(out *OrganizationActionsVariableObservation) { + *out = *in + if in.CreatedAt != nil { + in, out := &in.CreatedAt, &out.CreatedAt + *out = new(string) + **out = **in + } + if in.ID != nil { + in, out := &in.ID, &out.ID + *out = new(string) + **out = **in + } + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.UpdatedAt != nil { + in, out := &in.UpdatedAt, &out.UpdatedAt + *out = new(string) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + if in.VariableName != nil { + in, out := &in.VariableName, &out.VariableName + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableObservation. +func (in *OrganizationActionsVariableObservation) DeepCopy() *OrganizationActionsVariableObservation { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableObservation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableParameters) DeepCopyInto(out *OrganizationActionsVariableParameters) { + *out = *in + if in.SelectedRepositoryIds != nil { + in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds + *out = make([]*int64, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(int64) + **out = **in + } + } + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + if in.VariableName != nil { + in, out := &in.VariableName, &out.VariableName + *out = new(string) + **out = **in + } + if in.Visibility != nil { + in, out := &in.Visibility, &out.Visibility + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableParameters. +func (in *OrganizationActionsVariableParameters) DeepCopy() *OrganizationActionsVariableParameters { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableParameters) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableSpec) DeepCopyInto(out *OrganizationActionsVariableSpec) { + *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 OrganizationActionsVariableSpec. +func (in *OrganizationActionsVariableSpec) DeepCopy() *OrganizationActionsVariableSpec { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OrganizationActionsVariableStatus) DeepCopyInto(out *OrganizationActionsVariableStatus) { + *out = *in + in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) + in.AtProvider.DeepCopyInto(&out.AtProvider) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableStatus. +func (in *OrganizationActionsVariableStatus) DeepCopy() *OrganizationActionsVariableStatus { + if in == nil { + return nil + } + out := new(OrganizationActionsVariableStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RunnerGroup) DeepCopyInto(out *RunnerGroup) { *out = *in diff --git a/apis/actions/v1alpha1/zz_generated.managed.go b/apis/actions/v1alpha1/zz_generated.managed.go index 7655eca..80509df 100644 --- a/apis/actions/v1alpha1/zz_generated.managed.go +++ b/apis/actions/v1alpha1/zz_generated.managed.go @@ -127,6 +127,126 @@ func (mg *ActionsVariable) SetWriteConnectionSecretToReference(r *xpv1.SecretRef mg.Spec.WriteConnectionSecretToReference = r } +// GetCondition of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this OrganizationActionsSecret. +func (mg *OrganizationActionsSecret) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + +// GetCondition of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetCondition(ct xpv1.ConditionType) xpv1.Condition { + return mg.Status.GetCondition(ct) +} + +// GetDeletionPolicy of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetDeletionPolicy() xpv1.DeletionPolicy { + return mg.Spec.DeletionPolicy +} + +// GetManagementPolicies of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetManagementPolicies() xpv1.ManagementPolicies { + return mg.Spec.ManagementPolicies +} + +// GetProviderConfigReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetProviderConfigReference() *xpv1.Reference { + return mg.Spec.ProviderConfigReference +} + +// GetPublishConnectionDetailsTo of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { + return mg.Spec.PublishConnectionDetailsTo +} + +// GetWriteConnectionSecretToReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) GetWriteConnectionSecretToReference() *xpv1.SecretReference { + return mg.Spec.WriteConnectionSecretToReference +} + +// SetConditions of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetConditions(c ...xpv1.Condition) { + mg.Status.SetConditions(c...) +} + +// SetDeletionPolicy of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetDeletionPolicy(r xpv1.DeletionPolicy) { + mg.Spec.DeletionPolicy = r +} + +// SetManagementPolicies of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetManagementPolicies(r xpv1.ManagementPolicies) { + mg.Spec.ManagementPolicies = r +} + +// SetProviderConfigReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetProviderConfigReference(r *xpv1.Reference) { + mg.Spec.ProviderConfigReference = r +} + +// SetPublishConnectionDetailsTo of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { + mg.Spec.PublishConnectionDetailsTo = r +} + +// SetWriteConnectionSecretToReference of this OrganizationActionsVariable. +func (mg *OrganizationActionsVariable) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { + mg.Spec.WriteConnectionSecretToReference = r +} + // GetCondition of this RunnerGroup. func (mg *RunnerGroup) GetCondition(ct xpv1.ConditionType) xpv1.Condition { return mg.Status.GetCondition(ct) diff --git a/apis/actions/v1alpha1/zz_generated.managedlist.go b/apis/actions/v1alpha1/zz_generated.managedlist.go index f31ce97..594272b 100644 --- a/apis/actions/v1alpha1/zz_generated.managedlist.go +++ b/apis/actions/v1alpha1/zz_generated.managedlist.go @@ -25,6 +25,24 @@ func (l *ActionsVariableList) GetItems() []resource.Managed { return items } +// GetItems of this OrganizationActionsSecretList. +func (l *OrganizationActionsSecretList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + +// GetItems of this OrganizationActionsVariableList. +func (l *OrganizationActionsVariableList) GetItems() []resource.Managed { + items := make([]resource.Managed, len(l.Items)) + for i := range l.Items { + items[i] = &l.Items[i] + } + return items +} + // GetItems of this RunnerGroupList. func (l *RunnerGroupList) GetItems() []resource.Managed { items := make([]resource.Managed, len(l.Items)) diff --git a/apis/organization/v1alpha1/zz_organizationactionssecret_terraformed.go b/apis/actions/v1alpha1/zz_organizationactionssecret_terraformed.go similarity index 100% rename from apis/organization/v1alpha1/zz_organizationactionssecret_terraformed.go rename to apis/actions/v1alpha1/zz_organizationactionssecret_terraformed.go diff --git a/apis/organization/v1alpha1/zz_organizationactionssecret_types.go b/apis/actions/v1alpha1/zz_organizationactionssecret_types.go similarity index 100% rename from apis/organization/v1alpha1/zz_organizationactionssecret_types.go rename to apis/actions/v1alpha1/zz_organizationactionssecret_types.go diff --git a/apis/organization/v1alpha1/zz_organizationactionsvariable_terraformed.go b/apis/actions/v1alpha1/zz_organizationactionsvariable_terraformed.go similarity index 100% rename from apis/organization/v1alpha1/zz_organizationactionsvariable_terraformed.go rename to apis/actions/v1alpha1/zz_organizationactionsvariable_terraformed.go diff --git a/apis/organization/v1alpha1/zz_organizationactionsvariable_types.go b/apis/actions/v1alpha1/zz_organizationactionsvariable_types.go similarity index 100% rename from apis/organization/v1alpha1/zz_organizationactionsvariable_types.go rename to apis/actions/v1alpha1/zz_organizationactionsvariable_types.go diff --git a/apis/organization/v1alpha1/zz_generated.conversion_hubs.go b/apis/organization/v1alpha1/zz_generated.conversion_hubs.go deleted file mode 100755 index cb42839..0000000 --- a/apis/organization/v1alpha1/zz_generated.conversion_hubs.go +++ /dev/null @@ -1,13 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ - -// Code generated by upjet. DO NOT EDIT. - -package v1alpha1 - -// Hub marks this type as a conversion hub. -func (tr *OrganizationActionsSecret) Hub() {} - -// Hub marks this type as a conversion hub. -func (tr *OrganizationActionsVariable) Hub() {} diff --git a/apis/organization/v1alpha1/zz_generated.deepcopy.go b/apis/organization/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 556229d..0000000 --- a/apis/organization/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,483 +0,0 @@ -//go:build !ignore_autogenerated - -/* -Copyright 2022 Upbound Inc. -*/ - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "github.com/crossplane/crossplane-runtime/apis/common/v1" - 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 *OrganizationActionsSecret) DeepCopyInto(out *OrganizationActionsSecret) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecret. -func (in *OrganizationActionsSecret) DeepCopy() *OrganizationActionsSecret { - if in == nil { - return nil - } - out := new(OrganizationActionsSecret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrganizationActionsSecret) 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 *OrganizationActionsSecretInitParameters) DeepCopyInto(out *OrganizationActionsSecretInitParameters) { - *out = *in - if in.EncryptedValueSecretRef != nil { - in, out := &in.EncryptedValueSecretRef, &out.EncryptedValueSecretRef - *out = new(v1.SecretKeySelector) - **out = **in - } - if in.PlaintextValueSecretRef != nil { - in, out := &in.PlaintextValueSecretRef, &out.PlaintextValueSecretRef - *out = new(v1.SecretKeySelector) - **out = **in - } - if in.SecretName != nil { - in, out := &in.SecretName, &out.SecretName - *out = new(string) - **out = **in - } - if in.SelectedRepositoryIds != nil { - in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds - *out = make([]*int64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(int64) - **out = **in - } - } - } - if in.Visibility != nil { - in, out := &in.Visibility, &out.Visibility - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretInitParameters. -func (in *OrganizationActionsSecretInitParameters) DeepCopy() *OrganizationActionsSecretInitParameters { - if in == nil { - return nil - } - out := new(OrganizationActionsSecretInitParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsSecretList) DeepCopyInto(out *OrganizationActionsSecretList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OrganizationActionsSecret, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretList. -func (in *OrganizationActionsSecretList) DeepCopy() *OrganizationActionsSecretList { - if in == nil { - return nil - } - out := new(OrganizationActionsSecretList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrganizationActionsSecretList) 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 *OrganizationActionsSecretObservation) DeepCopyInto(out *OrganizationActionsSecretObservation) { - *out = *in - if in.CreatedAt != nil { - in, out := &in.CreatedAt, &out.CreatedAt - *out = new(string) - **out = **in - } - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.SecretName != nil { - in, out := &in.SecretName, &out.SecretName - *out = new(string) - **out = **in - } - if in.SelectedRepositoryIds != nil { - in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds - *out = make([]*int64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(int64) - **out = **in - } - } - } - if in.UpdatedAt != nil { - in, out := &in.UpdatedAt, &out.UpdatedAt - *out = new(string) - **out = **in - } - if in.Visibility != nil { - in, out := &in.Visibility, &out.Visibility - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretObservation. -func (in *OrganizationActionsSecretObservation) DeepCopy() *OrganizationActionsSecretObservation { - if in == nil { - return nil - } - out := new(OrganizationActionsSecretObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsSecretParameters) DeepCopyInto(out *OrganizationActionsSecretParameters) { - *out = *in - if in.EncryptedValueSecretRef != nil { - in, out := &in.EncryptedValueSecretRef, &out.EncryptedValueSecretRef - *out = new(v1.SecretKeySelector) - **out = **in - } - if in.PlaintextValueSecretRef != nil { - in, out := &in.PlaintextValueSecretRef, &out.PlaintextValueSecretRef - *out = new(v1.SecretKeySelector) - **out = **in - } - if in.SecretName != nil { - in, out := &in.SecretName, &out.SecretName - *out = new(string) - **out = **in - } - if in.SelectedRepositoryIds != nil { - in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds - *out = make([]*int64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(int64) - **out = **in - } - } - } - if in.Visibility != nil { - in, out := &in.Visibility, &out.Visibility - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretParameters. -func (in *OrganizationActionsSecretParameters) DeepCopy() *OrganizationActionsSecretParameters { - if in == nil { - return nil - } - out := new(OrganizationActionsSecretParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsSecretSpec) DeepCopyInto(out *OrganizationActionsSecretSpec) { - *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 OrganizationActionsSecretSpec. -func (in *OrganizationActionsSecretSpec) DeepCopy() *OrganizationActionsSecretSpec { - if in == nil { - return nil - } - out := new(OrganizationActionsSecretSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsSecretStatus) DeepCopyInto(out *OrganizationActionsSecretStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsSecretStatus. -func (in *OrganizationActionsSecretStatus) DeepCopy() *OrganizationActionsSecretStatus { - if in == nil { - return nil - } - out := new(OrganizationActionsSecretStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsVariable) DeepCopyInto(out *OrganizationActionsVariable) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariable. -func (in *OrganizationActionsVariable) DeepCopy() *OrganizationActionsVariable { - if in == nil { - return nil - } - out := new(OrganizationActionsVariable) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrganizationActionsVariable) 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 *OrganizationActionsVariableInitParameters) DeepCopyInto(out *OrganizationActionsVariableInitParameters) { - *out = *in - if in.SelectedRepositoryIds != nil { - in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds - *out = make([]*int64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(int64) - **out = **in - } - } - } - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - if in.VariableName != nil { - in, out := &in.VariableName, &out.VariableName - *out = new(string) - **out = **in - } - if in.Visibility != nil { - in, out := &in.Visibility, &out.Visibility - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableInitParameters. -func (in *OrganizationActionsVariableInitParameters) DeepCopy() *OrganizationActionsVariableInitParameters { - if in == nil { - return nil - } - out := new(OrganizationActionsVariableInitParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsVariableList) DeepCopyInto(out *OrganizationActionsVariableList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OrganizationActionsVariable, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableList. -func (in *OrganizationActionsVariableList) DeepCopy() *OrganizationActionsVariableList { - if in == nil { - return nil - } - out := new(OrganizationActionsVariableList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OrganizationActionsVariableList) 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 *OrganizationActionsVariableObservation) DeepCopyInto(out *OrganizationActionsVariableObservation) { - *out = *in - if in.CreatedAt != nil { - in, out := &in.CreatedAt, &out.CreatedAt - *out = new(string) - **out = **in - } - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.SelectedRepositoryIds != nil { - in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds - *out = make([]*int64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(int64) - **out = **in - } - } - } - if in.UpdatedAt != nil { - in, out := &in.UpdatedAt, &out.UpdatedAt - *out = new(string) - **out = **in - } - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - if in.VariableName != nil { - in, out := &in.VariableName, &out.VariableName - *out = new(string) - **out = **in - } - if in.Visibility != nil { - in, out := &in.Visibility, &out.Visibility - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableObservation. -func (in *OrganizationActionsVariableObservation) DeepCopy() *OrganizationActionsVariableObservation { - if in == nil { - return nil - } - out := new(OrganizationActionsVariableObservation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsVariableParameters) DeepCopyInto(out *OrganizationActionsVariableParameters) { - *out = *in - if in.SelectedRepositoryIds != nil { - in, out := &in.SelectedRepositoryIds, &out.SelectedRepositoryIds - *out = make([]*int64, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(int64) - **out = **in - } - } - } - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - if in.VariableName != nil { - in, out := &in.VariableName, &out.VariableName - *out = new(string) - **out = **in - } - if in.Visibility != nil { - in, out := &in.Visibility, &out.Visibility - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableParameters. -func (in *OrganizationActionsVariableParameters) DeepCopy() *OrganizationActionsVariableParameters { - if in == nil { - return nil - } - out := new(OrganizationActionsVariableParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsVariableSpec) DeepCopyInto(out *OrganizationActionsVariableSpec) { - *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 OrganizationActionsVariableSpec. -func (in *OrganizationActionsVariableSpec) DeepCopy() *OrganizationActionsVariableSpec { - if in == nil { - return nil - } - out := new(OrganizationActionsVariableSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OrganizationActionsVariableStatus) DeepCopyInto(out *OrganizationActionsVariableStatus) { - *out = *in - in.ResourceStatus.DeepCopyInto(&out.ResourceStatus) - in.AtProvider.DeepCopyInto(&out.AtProvider) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OrganizationActionsVariableStatus. -func (in *OrganizationActionsVariableStatus) DeepCopy() *OrganizationActionsVariableStatus { - if in == nil { - return nil - } - out := new(OrganizationActionsVariableStatus) - in.DeepCopyInto(out) - return out -} diff --git a/apis/organization/v1alpha1/zz_generated.managed.go b/apis/organization/v1alpha1/zz_generated.managed.go deleted file mode 100644 index b949cd1..0000000 --- a/apis/organization/v1alpha1/zz_generated.managed.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1" - -// GetCondition of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return mg.Status.GetCondition(ct) -} - -// GetDeletionPolicy of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) GetDeletionPolicy() xpv1.DeletionPolicy { - return mg.Spec.DeletionPolicy -} - -// GetManagementPolicies of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) GetManagementPolicies() xpv1.ManagementPolicies { - return mg.Spec.ManagementPolicies -} - -// GetProviderConfigReference of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) GetProviderConfigReference() *xpv1.Reference { - return mg.Spec.ProviderConfigReference -} - -// GetPublishConnectionDetailsTo of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { - return mg.Spec.PublishConnectionDetailsTo -} - -// GetWriteConnectionSecretToReference of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) GetWriteConnectionSecretToReference() *xpv1.SecretReference { - return mg.Spec.WriteConnectionSecretToReference -} - -// SetConditions of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) SetConditions(c ...xpv1.Condition) { - mg.Status.SetConditions(c...) -} - -// SetDeletionPolicy of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) SetDeletionPolicy(r xpv1.DeletionPolicy) { - mg.Spec.DeletionPolicy = r -} - -// SetManagementPolicies of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) SetManagementPolicies(r xpv1.ManagementPolicies) { - mg.Spec.ManagementPolicies = r -} - -// SetProviderConfigReference of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) SetProviderConfigReference(r *xpv1.Reference) { - mg.Spec.ProviderConfigReference = r -} - -// SetPublishConnectionDetailsTo of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { - mg.Spec.PublishConnectionDetailsTo = r -} - -// SetWriteConnectionSecretToReference of this OrganizationActionsSecret. -func (mg *OrganizationActionsSecret) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { - mg.Spec.WriteConnectionSecretToReference = r -} - -// GetCondition of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) GetCondition(ct xpv1.ConditionType) xpv1.Condition { - return mg.Status.GetCondition(ct) -} - -// GetDeletionPolicy of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) GetDeletionPolicy() xpv1.DeletionPolicy { - return mg.Spec.DeletionPolicy -} - -// GetManagementPolicies of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) GetManagementPolicies() xpv1.ManagementPolicies { - return mg.Spec.ManagementPolicies -} - -// GetProviderConfigReference of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) GetProviderConfigReference() *xpv1.Reference { - return mg.Spec.ProviderConfigReference -} - -// GetPublishConnectionDetailsTo of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo { - return mg.Spec.PublishConnectionDetailsTo -} - -// GetWriteConnectionSecretToReference of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) GetWriteConnectionSecretToReference() *xpv1.SecretReference { - return mg.Spec.WriteConnectionSecretToReference -} - -// SetConditions of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) SetConditions(c ...xpv1.Condition) { - mg.Status.SetConditions(c...) -} - -// SetDeletionPolicy of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) SetDeletionPolicy(r xpv1.DeletionPolicy) { - mg.Spec.DeletionPolicy = r -} - -// SetManagementPolicies of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) SetManagementPolicies(r xpv1.ManagementPolicies) { - mg.Spec.ManagementPolicies = r -} - -// SetProviderConfigReference of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) SetProviderConfigReference(r *xpv1.Reference) { - mg.Spec.ProviderConfigReference = r -} - -// SetPublishConnectionDetailsTo of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) SetPublishConnectionDetailsTo(r *xpv1.PublishConnectionDetailsTo) { - mg.Spec.PublishConnectionDetailsTo = r -} - -// SetWriteConnectionSecretToReference of this OrganizationActionsVariable. -func (mg *OrganizationActionsVariable) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) { - mg.Spec.WriteConnectionSecretToReference = r -} diff --git a/apis/organization/v1alpha1/zz_generated.managedlist.go b/apis/organization/v1alpha1/zz_generated.managedlist.go deleted file mode 100644 index 69b3dd7..0000000 --- a/apis/organization/v1alpha1/zz_generated.managedlist.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ -// Code generated by angryjet. DO NOT EDIT. - -package v1alpha1 - -import resource "github.com/crossplane/crossplane-runtime/pkg/resource" - -// GetItems of this OrganizationActionsSecretList. -func (l *OrganizationActionsSecretList) GetItems() []resource.Managed { - items := make([]resource.Managed, len(l.Items)) - for i := range l.Items { - items[i] = &l.Items[i] - } - return items -} - -// GetItems of this OrganizationActionsVariableList. -func (l *OrganizationActionsVariableList) GetItems() []resource.Managed { - items := make([]resource.Managed, len(l.Items)) - for i := range l.Items { - items[i] = &l.Items[i] - } - return items -} diff --git a/apis/organization/v1alpha1/zz_groupversion_info.go b/apis/organization/v1alpha1/zz_groupversion_info.go deleted file mode 100755 index 95e0c63..0000000 --- a/apis/organization/v1alpha1/zz_groupversion_info.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2022 Upbound Inc. -*/ - -// Code generated by upjet. DO NOT EDIT. - -// +kubebuilder:object:generate=true -// +groupName=organization.github.upbound.io -// +versionName=v1alpha1 -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -// Package type metadata. -const ( - CRDGroup = "organization.github.upbound.io" - CRDVersion = "v1alpha1" -) - -var ( - // CRDGroupVersion is the API Group Version used to register the objects - CRDGroupVersion = schema.GroupVersion{Group: CRDGroup, Version: CRDVersion} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: CRDGroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/apis/zz_register.go b/apis/zz_register.go index bc33351..3aafc93 100755 --- a/apis/zz_register.go +++ b/apis/zz_register.go @@ -12,7 +12,6 @@ import ( v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/actions/v1alpha1" v1alpha1enterprise "github.com/crossplane-contrib/provider-upjet-github/apis/enterprise/v1alpha1" - v1alpha1organization "github.com/crossplane-contrib/provider-upjet-github/apis/organization/v1alpha1" v1alpha1repo "github.com/crossplane-contrib/provider-upjet-github/apis/repo/v1alpha1" v1alpha1team "github.com/crossplane-contrib/provider-upjet-github/apis/team/v1alpha1" v1alpha1user "github.com/crossplane-contrib/provider-upjet-github/apis/user/v1alpha1" @@ -25,7 +24,6 @@ func init() { AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme, v1alpha1enterprise.SchemeBuilder.AddToScheme, - v1alpha1organization.SchemeBuilder.AddToScheme, v1alpha1repo.SchemeBuilder.AddToScheme, v1alpha1team.SchemeBuilder.AddToScheme, v1alpha1user.SchemeBuilder.AddToScheme, diff --git a/config/organizationactionssecret/config.go b/config/organizationactionssecret/config.go index 030ec81..3e93593 100644 --- a/config/organizationactionssecret/config.go +++ b/config/organizationactionssecret/config.go @@ -8,6 +8,6 @@ func Configure(p *config.Provider) { // We need to override the default group that upjet generated for // this resource, which would be "github" r.Kind = "OrganizationActionsSecret" - r.ShortGroup = "organization" + r.ShortGroup = "actions" }) } diff --git a/config/organizationactionsvariable/config.go b/config/organizationactionsvariable/config.go index 69e286e..d1af14f 100644 --- a/config/organizationactionsvariable/config.go +++ b/config/organizationactionsvariable/config.go @@ -8,6 +8,6 @@ func Configure(p *config.Provider) { // We need to override the default group that upjet generated for // this resource, which would be "github" r.Kind = "OrganizationActionsVariable" - r.ShortGroup = "organization" + r.ShortGroup = "actions" }) } diff --git a/examples-generated/organization/v1alpha1/organizationactionssecret.yaml b/examples-generated/actions/v1alpha1/organizationactionssecret.yaml similarity index 71% rename from examples-generated/organization/v1alpha1/organizationactionssecret.yaml rename to examples-generated/actions/v1alpha1/organizationactionssecret.yaml index 8d7133b..dc0e726 100644 --- a/examples-generated/organization/v1alpha1/organizationactionssecret.yaml +++ b/examples-generated/actions/v1alpha1/organizationactionssecret.yaml @@ -1,8 +1,8 @@ -apiVersion: organization.github.upbound.io/v1alpha1 +apiVersion: actions.github.upbound.io/v1alpha1 kind: OrganizationActionsSecret metadata: annotations: - meta.upbound.io/example-id: organization/v1alpha1/organizationactionssecret + meta.upbound.io/example-id: actions/v1alpha1/organizationactionssecret labels: testing.upbound.io/example-name: example_secret name: example-secret diff --git a/examples-generated/organization/v1alpha1/organizationactionsvariable.yaml b/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml similarity index 66% rename from examples-generated/organization/v1alpha1/organizationactionsvariable.yaml rename to examples-generated/actions/v1alpha1/organizationactionsvariable.yaml index 7449b13..df1b4a9 100644 --- a/examples-generated/organization/v1alpha1/organizationactionsvariable.yaml +++ b/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml @@ -1,8 +1,8 @@ -apiVersion: organization.github.upbound.io/v1alpha1 +apiVersion: actions.github.upbound.io/v1alpha1 kind: OrganizationActionsVariable metadata: annotations: - meta.upbound.io/example-id: organization/v1alpha1/organizationactionsvariable + meta.upbound.io/example-id: actions/v1alpha1/organizationactionsvariable labels: testing.upbound.io/example-name: example_variable name: example-variable diff --git a/examples/organization/organizationactionssecret.yaml b/examples/organization/organizationactionssecret.yaml new file mode 100644 index 0000000..872979c --- /dev/null +++ b/examples/organization/organizationactionssecret.yaml @@ -0,0 +1,20 @@ +apiVersion: actions.github.upbound.io/v1alpha1 +kind: OrganizationActionsSecret +metadata: + name: organization-secret-test +spec: + forProvider: + secretName: TEST_SECRET + plaintextValueSecretRef: + key: howdy + name: organization-secret-secret + namespace: default + providerConfigRef: + name: default +--- +apiVersion: v1 +kind: Secret +metadata: + name: organization-secret-secret +stringData: + howdy: a-secret-text diff --git a/internal/controller/organization/organizationactionssecret/zz_controller.go b/internal/controller/actions/organizationactionssecret/zz_controller.go similarity index 99% rename from internal/controller/organization/organizationactionssecret/zz_controller.go rename to internal/controller/actions/organizationactionssecret/zz_controller.go index a37fcd7..3a91a29 100755 --- a/internal/controller/organization/organizationactionssecret/zz_controller.go +++ b/internal/controller/actions/organizationactionssecret/zz_controller.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" - v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/organization/v1alpha1" + v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/actions/v1alpha1" features "github.com/crossplane-contrib/provider-upjet-github/internal/features" ) diff --git a/internal/controller/organization/organizationactionsvariable/zz_controller.go b/internal/controller/actions/organizationactionsvariable/zz_controller.go similarity index 99% rename from internal/controller/organization/organizationactionsvariable/zz_controller.go rename to internal/controller/actions/organizationactionsvariable/zz_controller.go index 4ea0792..bb8ff46 100755 --- a/internal/controller/organization/organizationactionsvariable/zz_controller.go +++ b/internal/controller/actions/organizationactionsvariable/zz_controller.go @@ -21,7 +21,7 @@ import ( "github.com/pkg/errors" ctrl "sigs.k8s.io/controller-runtime" - v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/organization/v1alpha1" + v1alpha1 "github.com/crossplane-contrib/provider-upjet-github/apis/actions/v1alpha1" features "github.com/crossplane-contrib/provider-upjet-github/internal/features" ) diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 0b42cc7..3a3a161 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -11,11 +11,11 @@ import ( actionssecret "github.com/crossplane-contrib/provider-upjet-github/internal/controller/actions/actionssecret" actionsvariable "github.com/crossplane-contrib/provider-upjet-github/internal/controller/actions/actionsvariable" + organizationactionssecret "github.com/crossplane-contrib/provider-upjet-github/internal/controller/actions/organizationactionssecret" + organizationactionsvariable "github.com/crossplane-contrib/provider-upjet-github/internal/controller/actions/organizationactionsvariable" runnergroup "github.com/crossplane-contrib/provider-upjet-github/internal/controller/actions/runnergroup" organization "github.com/crossplane-contrib/provider-upjet-github/internal/controller/enterprise/organization" organizationruleset "github.com/crossplane-contrib/provider-upjet-github/internal/controller/enterprise/organizationruleset" - organizationactionssecret "github.com/crossplane-contrib/provider-upjet-github/internal/controller/organization/organizationactionssecret" - organizationactionsvariable "github.com/crossplane-contrib/provider-upjet-github/internal/controller/organization/organizationactionsvariable" providerconfig "github.com/crossplane-contrib/provider-upjet-github/internal/controller/providerconfig" branch "github.com/crossplane-contrib/provider-upjet-github/internal/controller/repo/branch" branchprotection "github.com/crossplane-contrib/provider-upjet-github/internal/controller/repo/branchprotection" @@ -44,11 +44,11 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { for _, setup := range []func(ctrl.Manager, controller.Options) error{ actionssecret.Setup, actionsvariable.Setup, + organizationactionssecret.Setup, + organizationactionsvariable.Setup, runnergroup.Setup, organization.Setup, organizationruleset.Setup, - organizationactionssecret.Setup, - organizationactionsvariable.Setup, providerconfig.Setup, branch.Setup, branchprotection.Setup, diff --git a/package/crds/organization.github.upbound.io_organizationactionssecrets.yaml b/package/crds/actions.github.upbound.io_organizationactionssecrets.yaml similarity index 99% rename from package/crds/organization.github.upbound.io_organizationactionssecrets.yaml rename to package/crds/actions.github.upbound.io_organizationactionssecrets.yaml index e226485..f522ea0 100644 --- a/package/crds/organization.github.upbound.io_organizationactionssecrets.yaml +++ b/package/crds/actions.github.upbound.io_organizationactionssecrets.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: organizationactionssecrets.organization.github.upbound.io + name: organizationactionssecrets.actions.github.upbound.io spec: - group: organization.github.upbound.io + group: actions.github.upbound.io names: categories: - crossplane diff --git a/package/crds/organization.github.upbound.io_organizationactionsvariables.yaml b/package/crds/actions.github.upbound.io_organizationactionsvariables.yaml similarity index 99% rename from package/crds/organization.github.upbound.io_organizationactionsvariables.yaml rename to package/crds/actions.github.upbound.io_organizationactionsvariables.yaml index 5dffbcf..b10cdaa 100644 --- a/package/crds/organization.github.upbound.io_organizationactionsvariables.yaml +++ b/package/crds/actions.github.upbound.io_organizationactionsvariables.yaml @@ -4,9 +4,9 @@ kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.14.0 - name: organizationactionsvariables.organization.github.upbound.io + name: organizationactionsvariables.actions.github.upbound.io spec: - group: organization.github.upbound.io + group: actions.github.upbound.io names: categories: - crossplane From 21ec51067e2129ed092d4575ae86dd91065434ab Mon Sep 17 00:00:00 2001 From: Thorsten Gilfert Date: Tue, 7 Jan 2025 09:05:00 +0100 Subject: [PATCH 3/4] Add examples and documentation Signed-off-by: Thorsten Gilfert --- README.md | 23 +++++++++++++++---- .../v1alpha1/organizationactionssecret.yaml | 16 ------------- .../v1alpha1/organizationactionsvariable.yaml | 13 ----------- .../organizationactionssecret.yaml | 1 + .../actions/organizationactionsvariable.yaml | 9 ++++++++ 5 files changed, 29 insertions(+), 33 deletions(-) delete mode 100644 examples-generated/actions/v1alpha1/organizationactionssecret.yaml delete mode 100644 examples-generated/actions/v1alpha1/organizationactionsvariable.yaml rename examples/{organization => actions}/organizationactionssecret.yaml (94%) create mode 100644 examples/actions/organizationactionsvariable.yaml diff --git a/README.md b/README.md index c16dd09..b746638 100644 --- a/README.md +++ b/README.md @@ -57,13 +57,13 @@ spec: name: provider-secret namespace: upbound-system key: credentials - ``` #### Provider config example with Github application based authentication Note that the PEM certificate needs to be wrapped in a non-multiline string, with the characters "\n" as newline. See Terraform provider doc for more information. + ```yaml --- apiVersion: v1 @@ -87,9 +87,24 @@ spec: name: provider-secret namespace: upbound-system key: credentials - ``` +### Provider config scope + +Most operations of the provider happen in the scope of the `owner` attribute in the `credentials` JSON structure. This means that the provider +will create resources in the context of the given owner. For example, if you want to create a repository in an organization, the `owner` attribute +must point to a GitHub organization. If you want to create a repository in a user account, the `owner` attribute must point to a GitHub user +account. + +Note that some resources like `OrganizationActionsSecret` and `OrganizationActionsVariable` require the `owner` attribute to point to the +organization as they are not supported at the user level. + +Administration of resources on the *organization* level requires a token with at least `admin:org` scope. + +There are a few endpoints in the GitHub API that operate on the *enterprise* level and can be used for GitHub customers that have an enterprise +account. One such resource is `Organization` which can be used to provision new organizations on the enterprise level. In this case, the token +or app authentication must have at least `admin:enterprise` scope. + ## Supported resources | Kind | Group | Terraform Resource Name | Notes | @@ -112,8 +127,8 @@ spec: | `TeamSyncGroupMapping` | `team` | `github_team_sync_group_mapping` | | | `EmuTeamMapping` | `team` | `github_emu_group_mapping` | | | `ActionsSecret` | `actions` | `github_actions_secret` | | -| `OrganizationActionsSecret` | `actions` | `github_organization_actions_secret` | | -| `OrganizationActionsVariable` | `actions` | `github_organization_actions_variable` | | +| `OrganizationActionsSecret` | `actions` | `github_organization_actions_secret` | The `owner` attribute in the `credentials` JSON structure must point to the organization. | +| `OrganizationActionsVariable` | `actions` | `github_organization_actions_variable` | The `owner` attribute in the `credentials` JSON structure must point to the organization. | | `OrganizationRuleset` | `organization` | `github_organization_ruleset` | | | `Membership` | `user` | `github_membership` | Works only with - GitHub App user access tokens - GitHub App installation access tokens - Fine-grained personal access tokens using a token with at least `members:read` | | `Organization` | `enterprise` | `github_enterprise_organization` | Works only with PAT based authentication using a token with at least `admin:enterprise` scope.
The following *GraphQL* query can be used to obtain the required `enterprise_id`:
`gh api graphql -f query='query ($slug: String!) { enterprise(slug: $slug) { id } }' -F slug='' --jq '.data.enterprise.id'` | diff --git a/examples-generated/actions/v1alpha1/organizationactionssecret.yaml b/examples-generated/actions/v1alpha1/organizationactionssecret.yaml deleted file mode 100644 index dc0e726..0000000 --- a/examples-generated/actions/v1alpha1/organizationactionssecret.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: actions.github.upbound.io/v1alpha1 -kind: OrganizationActionsSecret -metadata: - annotations: - meta.upbound.io/example-id: actions/v1alpha1/organizationactionssecret - labels: - testing.upbound.io/example-name: example_secret - name: example-secret -spec: - forProvider: - plaintextValueSecretRef: - key: example-key - name: example-secret - namespace: upbound-system - secretName: example_secret_name - visibility: private diff --git a/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml b/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml deleted file mode 100644 index df1b4a9..0000000 --- a/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml +++ /dev/null @@ -1,13 +0,0 @@ -apiVersion: actions.github.upbound.io/v1alpha1 -kind: OrganizationActionsVariable -metadata: - annotations: - meta.upbound.io/example-id: actions/v1alpha1/organizationactionsvariable - labels: - testing.upbound.io/example-name: example_variable - name: example-variable -spec: - forProvider: - value: example_variable_value - variableName: example_variable_name - visibility: private diff --git a/examples/organization/organizationactionssecret.yaml b/examples/actions/organizationactionssecret.yaml similarity index 94% rename from examples/organization/organizationactionssecret.yaml rename to examples/actions/organizationactionssecret.yaml index 872979c..066c945 100644 --- a/examples/organization/organizationactionssecret.yaml +++ b/examples/actions/organizationactionssecret.yaml @@ -5,6 +5,7 @@ metadata: spec: forProvider: secretName: TEST_SECRET + visibility: private plaintextValueSecretRef: key: howdy name: organization-secret-secret diff --git a/examples/actions/organizationactionsvariable.yaml b/examples/actions/organizationactionsvariable.yaml new file mode 100644 index 0000000..0f4639c --- /dev/null +++ b/examples/actions/organizationactionsvariable.yaml @@ -0,0 +1,9 @@ +apiVersion: actions.github.upbound.io/v1alpha1 +kind: OrganizationActionsVariable +metadata: + name: organization-variable-test +spec: + forProvider: + value: 'My variable value' + variableName: TEST_VARIABLE + visibility: private From eab4a7d4c28eaf15bc44b1e759121b249787e1c9 Mon Sep 17 00:00:00 2001 From: Thorsten Gilfert Date: Tue, 7 Jan 2025 09:13:44 +0100 Subject: [PATCH 4/4] Add missing files Signed-off-by: Thorsten Gilfert --- .../v1alpha1/organizationactionssecret.yaml | 16 ++++++++++++++++ .../v1alpha1/organizationactionsvariable.yaml | 13 +++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 examples-generated/actions/v1alpha1/organizationactionssecret.yaml create mode 100644 examples-generated/actions/v1alpha1/organizationactionsvariable.yaml diff --git a/examples-generated/actions/v1alpha1/organizationactionssecret.yaml b/examples-generated/actions/v1alpha1/organizationactionssecret.yaml new file mode 100644 index 0000000..dc0e726 --- /dev/null +++ b/examples-generated/actions/v1alpha1/organizationactionssecret.yaml @@ -0,0 +1,16 @@ +apiVersion: actions.github.upbound.io/v1alpha1 +kind: OrganizationActionsSecret +metadata: + annotations: + meta.upbound.io/example-id: actions/v1alpha1/organizationactionssecret + labels: + testing.upbound.io/example-name: example_secret + name: example-secret +spec: + forProvider: + plaintextValueSecretRef: + key: example-key + name: example-secret + namespace: upbound-system + secretName: example_secret_name + visibility: private diff --git a/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml b/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml new file mode 100644 index 0000000..df1b4a9 --- /dev/null +++ b/examples-generated/actions/v1alpha1/organizationactionsvariable.yaml @@ -0,0 +1,13 @@ +apiVersion: actions.github.upbound.io/v1alpha1 +kind: OrganizationActionsVariable +metadata: + annotations: + meta.upbound.io/example-id: actions/v1alpha1/organizationactionsvariable + labels: + testing.upbound.io/example-name: example_variable + name: example-variable +spec: + forProvider: + value: example_variable_value + variableName: example_variable_name + visibility: private