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

Provide alternative XEKS composition with function-kcl #65

Merged
merged 17 commits into from
May 2, 2024

Conversation

ytsarev
Copy link
Member

@ytsarev ytsarev commented Apr 18, 2024

Description of your changes

wc -l apis/composition.yaml
     584 apis/composition.yaml
 wc -l apis/composition-kcl.yaml
     357 apis/composition-kcl.yaml

Fixes #

I have:

  • Read and followed Upbound's contribution process.
  • Run make reviewable to ensure this PR is ready for review.
  • Added backport release-x.y labels to auto-backport this PR, as appropriate.

How has this code been tested

k apply -f examples/eks-xr-kcl.yaml
crossplane beta trace xeks configuration-aws-eks-kcl
NAME                                                                               SYNCED   READY   STATUS
XEKS/configuration-aws-eks-kcl                                                     True     True    Available
├─ SecurityGroup/sg-0b1964613fb0c7449                                              True     True    Available
├─ Addon/configuration-aws-eks-kcl-addon-aws-ebs-csi-driver                        True     True    Available
├─ Addon/configuration-aws-eks-kcl-addon-vpc-cni                                   True     True    Available
├─ ClusterAuth/configuration-aws-eks-kclcluster-auth                               True     True    Available
├─ Cluster/configuration-aws-eks-kcl-kubernetes-cluster                            True     True    Available
├─ NodeGroup/configuration-aws-eks-kcl-nodegroup-public                            True     True    Available
├─ ProviderConfig/configuration-aws-eks-helm                                       -        -
├─ OpenIDConnectProvider/configuration-aws-eks-kcl-oidc-provider                   True     True    Available
├─ RolePolicyAttachment/configuration-aws-eks-kcl-cluster-role-policy-attachment   True     True    Available
├─ RolePolicyAttachment/configuration-aws-eks-kcl-nodegroup-rpa-0                  True     True    Available
├─ RolePolicyAttachment/configuration-aws-eks-kcl-nodegroup-rpa-1                  True     True    Available
├─ RolePolicyAttachment/configuration-aws-eks-kcl-nodegroup-rpa-2                  True     True    Available
├─ Role/configuration-aws-eks-kcl-iam-role                                         True     True    Available
├─ Role/configuration-aws-eks-kcl-nodegroup-role                                   True     True    Available
├─ ProviderConfig/configuration-aws-eks-kubernetes                                 -        -
├─ Object/configuration-aws-eks-aws-auth                                           True     True    Available
└─ Object/configuration-aws-eks-irsa-settings                                      True     True    Available
make e2e
--- PASS: kuttl (2281.53s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/case (2281.05s)
PASS
12:05:02 [ OK ] running automated tests

ytsarev added 13 commits April 16, 2024 22:02
Signed-off-by: Yury Tsarev <[email protected]>
* Use ObservedComposedResources map for direct data sharing instead of
  using standard to P&T bi-directional patching

Signed-off-by: Yury Tsarev <[email protected]>
Signed-off-by: Yury Tsarev <[email protected]>
Signed-off-by: Yury Tsarev <[email protected]>
* Default target enables usage of krm.kcl.dev/ready annotation

Signed-off-by: Yury Tsarev <[email protected]>
Signed-off-by: Yury Tsarev <[email protected]>
Signed-off-by: Yury Tsarev <[email protected]>
Add dependencies
Add SKIP_DELETE

Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev requested review from bassam and haarchri April 18, 2024 10:10
* Upgrade to latest v0.6.0 function-kcl that enables composition
  resource name override, crossplane-contrib/function-kcl#81
* It enables to keep same metadata.name for different resource kinds,
  providerConfigs of helm and kubernetes in this case
* The metada.name = id is important convention that is used by other
  Configurations that integrate with configuration-aws-eks in the higher
  level platform-ref-aws

Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev ytsarev marked this pull request as ready for review April 19, 2024 21:57
@ytsarev
Copy link
Member Author

ytsarev commented Apr 19, 2024

With https://github.com/crossplane-contrib/function-kcl/releases/tag/v0.6.0 and b4f9a8b , now we can keep important ProviderConfig naming convention.

@ytsarev
Copy link
Member Author

ytsarev commented Apr 20, 2024

/test-examples

@ytsarev
Copy link
Member Author

ytsarev commented Apr 20, 2024

The uptest that covers both P&T and KCL implementations is green above ^.

ytsarev added 2 commits April 22, 2024 11:02
* Add missing policy to NodeGroup
* Reference composed resources through `metada.name` instead of
  repetitive potentially error-prone convention

Signed-off-by: Yury Tsarev <[email protected]>
* Align resource ordering creation with explicit conditionals
* Figure out how to properly do multiline YAML string with
  KCL(indentation is important)

Signed-off-by: Yury Tsarev <[email protected]>
@ytsarev
Copy link
Member Author

ytsarev commented Apr 22, 2024

/test-examples

@ytsarev ytsarev merged commit 234d1c2 into upbound:main May 2, 2024
2 checks passed
@ytsarev ytsarev deleted the try-kcl branch May 2, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants