Skip to content
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
9 changes: 6 additions & 3 deletions apis/core/v1alpha1/identifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ type AWSIdentifiers struct {
ARN *AWSResourceName `json:"arn,omitempty"`
// NameOrId is a user-supplied string identifier for the resource. It may
// or may not be globally unique, depending on the type of resource.
NameOrID *string `json:"nameOrID,omitempty"`
NameOrID string `json:"nameOrID,omitempty"`
// AdditionalKeys represents any additional arbitrary identifiers used when
// describing the target resource.
AdditionalKeys map[string]string `json:"additionalKeys,omitempty"`
}

// TargetKubernetesResource provides all the values necessary to identify a given ACK type
// and override any metadata values when creating a resource of that type.
type TargetKubernetesResource struct {
// +kubebuilder:validation:Required
Group *string `json:"group"`
Group string `json:"group"`
// +kubebuilder:validation:Required
Kind *string `json:"kind"`
Kind string `json:"kind"`
Metadata *PartialObjectMeta `json:"metadata,omitempty"`
}
36 changes: 22 additions & 14 deletions apis/core/v1alpha1/zz_generated.deepcopy.go

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

6 changes: 6 additions & 0 deletions config/crd/bases/services.k8s.aws_adoptedresources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ spec:
description: AWSIdentifiers provide all unique ways to reference an
AWS resource.
properties:
additionalKeys:
additionalProperties:
type: string
description: AdditionalKeys represents any additional arbitrary
identifiers used when describing the target resource.
type: object
arn:
description: ARN is the AWS Resource Name for the resource. It
is a globally unique identifier.
Expand Down
4 changes: 2 additions & 2 deletions pkg/runtime/adoption_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ func (r *adoptionReconciler) getTargetResourceGroupKind(
res *ackv1alpha1.AdoptedResource,
) schema.GroupKind {
return schema.GroupKind{
Group: *res.Spec.Kubernetes.Group,
Kind: *res.Spec.Kubernetes.Kind,
Group: res.Spec.Kubernetes.Group,
Kind: res.Spec.Kubernetes.Kind,
}
}

Expand Down