Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: clean up CTP from unused fields #115

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions apis/spaces/v1beta1/controlplane_types.go
lsviben marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -182,39 +182,6 @@ type ControlPlaneSpec struct {
// Deprecated: Use Hub or Upbound identities instead.
// +optional
WriteConnectionSecretToReference *SecretReference `json:"writeConnectionSecretToRef,omitempty"`
lsviben marked this conversation as resolved.
Show resolved Hide resolved
// 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.
//
// Deprecated: Use Hub or Upbound identities instead.
// +optional
PublishConnectionDetailsTo *xpv1.PublishConnectionDetailsTo `json:"publishConnectionDetailsTo,omitempty"`
// THIS IS AN ALPHA FIELD. Do not use it in production. It is not honored
// unless the relevant Crossplane feature flag is enabled, and may be
// changed or removed without notice.
// 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
// +optional
// +kubebuilder:default={"*"}
ManagementPolicies xpv1.ManagementPolicies `json:"managementPolicies,omitempty"`
// DeletionPolicy specifies what will happen to the underlying external
// resource when this managed resource is deleted - either "Delete" or
// "Orphan" the external resource.
// This field is planned to be deprecated in favor of the ManagementPolicy
// 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
// +optional
// +kubebuilder:default=Delete
DeletionPolicy xpv1.DeletionPolicy `json:"deletionPolicy,omitempty"`

// Crossplane defines the configuration for Crossplane.
Crossplane CrossplaneSpec `json:"crossplane,omitempty"`
Expand Down Expand Up @@ -285,26 +252,6 @@ func (mg *ControlPlane) GetCondition(ct xpv1.ConditionType) xpv1.Condition {
return mg.Status.GetCondition(ct)
}

// GetDeletionPolicy of this Environment.
func (mg *ControlPlane) GetDeletionPolicy() xpv1.DeletionPolicy {
return mg.Spec.DeletionPolicy
}

// GetManagementPolicies of this ManagedControlPlane.
func (mg *ControlPlane) GetManagementPolicies() xpv1.ManagementPolicies {
return mg.Spec.ManagementPolicies
}

// GetProviderConfigReference of this ControlPlane.
func (mg *ControlPlane) GetProviderConfigReference() *xpv1.Reference {
return nil
}

// GetPublishConnectionDetailsTo of this ControlPlane.
func (mg *ControlPlane) GetPublishConnectionDetailsTo() *xpv1.PublishConnectionDetailsTo {
return mg.Spec.PublishConnectionDetailsTo
}

// GetWriteConnectionSecretToReference of this ControlPlane.
func (mg *ControlPlane) GetWriteConnectionSecretToReference() *xpv1.SecretReference {
if mg.Spec.WriteConnectionSecretToReference == nil {
Expand All @@ -321,25 +268,6 @@ func (mg *ControlPlane) SetConditions(c ...xpv1.Condition) {
mg.Status.SetConditions(c...)
}

// SetDeletionPolicy of this ControlPlane.
func (mg *ControlPlane) SetDeletionPolicy(r xpv1.DeletionPolicy) {}

// SetManagementPolicies of this ManagedControlPlane.
func (mg *ControlPlane) SetManagementPolicies(r xpv1.ManagementPolicies) {
mg.Spec.ManagementPolicies = r
}

// SetProviderReference of this ControlPlane.
func (mg *ControlPlane) SetProviderReference(r *xpv1.Reference) {}

// SetProviderConfigReference of this ControlPlane.
func (mg *ControlPlane) SetProviderConfigReference(r *xpv1.Reference) {}

// SetPublishConnectionDetailsTo of this ControlPlane.
func (mg *ControlPlane) SetPublishConnectionDetailsTo(p *xpv1.PublishConnectionDetailsTo) {
mg.Spec.PublishConnectionDetailsTo = p
}

// SetWriteConnectionSecretToReference of this ControlPlane.
func (mg *ControlPlane) SetWriteConnectionSecretToReference(r *xpv1.SecretReference) {
mg.Spec.WriteConnectionSecretToReference = &SecretReference{
Expand Down
11 changes: 0 additions & 11 deletions apis/spaces/v1beta1/zz_generated.deepcopy.go

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

Loading