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

feat(): refactor, add XIRSA composition, optional path for xservice gitops locations #8

Merged
merged 3 commits into from
Sep 15, 2023

Conversation

haarchri
Copy link
Member

@haarchri haarchri commented Sep 1, 2023

Description of your changes

Refactor:

  • for gitops-master, refactor xservice compositions to utilize patchSet.
  • In the xnetwork composition, remove the tag from VPC and set metadata.name for tags.Name to ensure the correct name is displayed in the AWS console.
  • change node size to instanceType

Additions:

  • Add an optional path for xservice to configure its location within the GitOps repository.
  • Introduce xirsa composition.
  • Enhance the xeks composition with the ability to generate a Kubernetes ConfigMap containing IRSA OIDC information, add aws-auth ConfigMap Object

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

NAME                                                        CHART        VERSION   SYNCED   READY   STATE      REVISION   DESCRIPTION        AGE
release.helm.crossplane.io/haarchri-spaces-01-lndwd-jsk7s   flux2-sync   1.6.2     True     True    deployed   1          Install complete   22h
release.helm.crossplane.io/haarchri-spaces-01-lndwd-mtc44   flux2        2.9.2     True     True    deployed   1          Install complete   22h

NAME                                                                                   KIND        PROVIDERCONFIG       SYNCED   READY   AGE
object.kubernetes.crossplane.io/aws-loadbalancer-controller-vx9kd                      ConfigMap   haarchri-spaces-01   True     True    82m
object.kubernetes.crossplane.io/haarchri-spaces-01-aws-loadbalancer-controller-tr7h2   ConfigMap   haarchri-spaces-01   True     True    75m
object.kubernetes.crossplane.io/haarchri-spaces-01-external-dns-rstft                  ConfigMap   haarchri-spaces-01   True     True    75m
object.kubernetes.crossplane.io/haarchri-spaces-01-flux-kustomize-controller-7p7bg     ConfigMap   haarchri-spaces-01   True     True    74m
object.kubernetes.crossplane.io/haarchri-spaces-01-irsa-settings                       ConfigMap   haarchri-spaces-01   True     True    93m

NAME                                                       READY   SYNCED   EXTERNAL-NAME              AGE
subnet.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-269t8   True    True     subnet-0933984407a0a2019   22h
subnet.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-6btft   True    True     subnet-0aa0e4616b452aaf0   22h
subnet.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-kbn8h   True    True     subnet-0446bc04c8d50abb5   22h
subnet.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-snxvj   True    True     subnet-0a81371b66cf11c88   22h

NAME                                                                READY   SYNCED   EXTERNAL-NAME           AGE
internetgateway.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-p8zlw   True    True     igw-035581722e200d004   22h

NAME                                                                          READY   SYNCED   EXTERNAL-NAME                AGE
mainroutetableassociation.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-bcc4t   True    True     rtbassoc-02c00c400018b16d8   22h

NAME                                                                      READY   SYNCED   EXTERNAL-NAME                AGE
routetableassociation.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-8tq2x   True    True     rtbassoc-09ba7bffe9758d510   22h
routetableassociation.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-jf6xh   True    True     rtbassoc-0b4767567aeaefa2f   22h
routetableassociation.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-ld577   True    True     rtbassoc-0180c601a3025d6c9   22h
routetableassociation.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-n4sc8   True    True     rtbassoc-017f540944ee04b3d   22h

NAME                                                      READY   SYNCED   EXTERNAL-NAME                       AGE
route.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-469zm   True    True     r-rtb-00b3db5beab20f9751080289494   22h

NAME                                                    READY   SYNCED   EXTERNAL-NAME           AGE
vpc.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-l9lh2   True    True     vpc-04e5098c5dc9fba25   22h

NAME                                                           READY   SYNCED   EXTERNAL-NAME           AGE
routetable.ec2.aws.upbound.io/haarchri-spaces-01-lndwd-25hgq   True    True     rtb-00b3db5beab20f975   22h

NAME                                                            READY   SYNCED   EXTERNAL-NAME                    AGE
clusterauth.eks.aws.upbound.io/haarchri-spaces-01-lndwd-jqzb7   True    True     haarchri-spaces-01-lndwd-jqzb7   22h

NAME                                                      READY   SYNCED   EXTERNAL-NAME                                       AGE
addon.eks.aws.upbound.io/haarchri-spaces-01-lndwd-jb2nh   True    True     haarchri-spaces-01-lndwd-r5d94:aws-ebs-csi-driver   22h

NAME                                                          READY   SYNCED   EXTERNAL-NAME                    AGE
nodegroup.eks.aws.upbound.io/haarchri-spaces-01-lndwd-r2gc6   True    True     haarchri-spaces-01-lndwd-r2gc6   22h

NAME                                                        READY   SYNCED   EXTERNAL-NAME                    AGE
cluster.eks.aws.upbound.io/haarchri-spaces-01-lndwd-r5d94   True    True     haarchri-spaces-01-lndwd-r5d94   22h

NAME                                                                             READY   SYNCED   EXTERNAL-NAME                                          AGE
policy.iam.aws.upbound.io/aws-loadbalancer-controller-ghvcw                      True    True     aws-loadbalancer-controller-ghvcw                      21h
policy.iam.aws.upbound.io/haarchri-spaces-01-aws-loadbalancer-controller-l8h7d   True    True     haarchri-spaces-01-aws-loadbalancer-controller-l8h7d   21h
policy.iam.aws.upbound.io/haarchri-spaces-01-external-dns-ws59m                  True    True     haarchri-spaces-01-external-dns-ws59m                  21h
policy.iam.aws.upbound.io/haarchri-spaces-01-flux-kustomize-controller-rxrbq     True    True     haarchri-spaces-01-flux-kustomize-controller-rxrbq     20h

NAME                                                                      READY   SYNCED   EXTERNAL-NAME                                                                                                     AGE
openidconnectprovider.iam.aws.upbound.io/haarchri-spaces-01-lndwd-zptgl   True    True     arn:aws:iam::609897127049:oidc-provider/oidc.eks.eu-central-1.amazonaws.com/id/02053DCA0262B21293420E0A3B39E81B   21h

NAME                                                                                           READY   SYNCED   EXTERNAL-NAME                                                               AGE
rolepolicyattachment.iam.aws.upbound.io/aws-loadbalancer-controller-9m4ks                      True    True     aws-loadbalancer-controller-20230831125548395800000001                      21h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-aws-loadbalancer-controller-dsdv5   True    True     haarchri-spaces-01-aws-loadbalancer-controller-20230831133727464400000002   21h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-external-dns-rvrlc                  True    True     haarchri-spaces-01-external-dns-20230831133717296800000001                  21h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-flux-kustomize-controller-qnwn2     True    True     haarchri-spaces-01-flux-kustomize-controller-20230831135957793400000001     20h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-lndwd-6xt5b                         True    True     haarchri-spaces-01-lndwd-z59m8-20230831124019105800000003                   22h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-lndwd-c8kgc                         True    True     haarchri-spaces-01-lndwd-z59m8-20230831124018687300000002                   22h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-lndwd-ggjtb                         True    True     haarchri-spaces-01-lndwd-z59m8-20230831124056319900000004                   22h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-lndwd-gh8z8                         True    True     haarchri-spaces-01-lndwd-z59m8-20230831124056762100000005                   22h
rolepolicyattachment.iam.aws.upbound.io/haarchri-spaces-01-lndwd-mgprg                         True    True     haarchri-spaces-01-lndwd-mt5wd-20230831124018604000000001                   22h

NAME                                                                           READY   SYNCED   EXTERNAL-NAME                                    AGE
role.iam.aws.upbound.io/aws-loadbalancer-controller-f6qbb                      True    True     aws-loadbalancer-controller                      21h
role.iam.aws.upbound.io/haarchri-spaces-01-aws-loadbalancer-controller-74qll   True    True     haarchri-spaces-01-aws-loadbalancer-controller   21h
role.iam.aws.upbound.io/haarchri-spaces-01-external-dns-h89pm                  True    True     haarchri-spaces-01-external-dns                  21h
role.iam.aws.upbound.io/haarchri-spaces-01-flux-kustomize-controller-ksgzv     True    True     haarchri-spaces-01-flux-kustomize-controller     20h
role.iam.aws.upbound.io/haarchri-spaces-01-lndwd-mt5wd                         True    True     haarchri-spaces-01-lndwd-mt5wd                   22h
role.iam.aws.upbound.io/haarchri-spaces-01-lndwd-z59m8                         True    True     haarchri-spaces-01-lndwd-z59m8                   22h

@haarchri haarchri force-pushed the feature/irsa branch 3 times, most recently from f182e45 to 158f01a Compare September 14, 2023 10:50
@haarchri
Copy link
Member Author

/test-examples=".up/examples/gcp/spoke-cluster.yaml"

@haarchri
Copy link
Member Author

/test-examples=".up/examples/azure/spoke-cluster.yaml"

@haarchri
Copy link
Member Author

/test-examples=".up/examples/aws/spoke-cluster.yaml"

Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put the whole stuff through the validation webhook:

find . -iname '*.yaml' |grep -v crossplane.yaml | xargs -n1 kubectl apply -f 2>&1 | grep Invalid
The Composition "xnetworks.azure.caas.upbound.io" is invalid: spec.resources[2].patches[3].patchSets[3].patches[0].toFieldPath: Invalid value: "spec.forProvider.location": field 'location' is not valid according to the schema
* spec.resources[1].patches[1].patchSets[1].patches[0].toFieldPath: Invalid value: "spec.deletionPolicy": field 'deletionPolicy' is not valid according to the schema
* spec.resources[2].patches[1].patchSets[1].patches[0].toFieldPath: Invalid value: "spec.deletionPolicy": field 'deletionPolicy' is not valid according to the schema
* spec.resources[0].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[1].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[0].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[1].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[2].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
The Composition "xclusters.azure.caas.upbound.io" is invalid: spec.resources[2].patches[0].toFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[0].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[1].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[0].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[1].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[2].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
The Composition "xclusters.gcp.caas.upbound.io" is invalid: spec.resources[2].patches[0].toFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[0].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[1].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[0].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[1].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
* spec.resources[2].patches[0].patchSets[0].patches[3].fromFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema
The Composition "xclusters.aws.caas.upbound.io" is invalid: spec.resources[2].patches[0].toFieldPath: Invalid value: "spec.parameters.deletionPolicy": field 'parameters' is not valid according to the schema

It looks like spec.parameters.deletionPolicy should be changed spec.deletionPolicy in multiple places

apis/azure/network/basic/composition.yaml Outdated Show resolved Hide resolved
@haarchri
Copy link
Member Author

find . -iname '*.yaml' | xargs -n1 kubectl apply -f 2>&1 | grep Invalid
no results anymore

@haarchri
Copy link
Member Author

/test-examples=".up/examples/aws/spoke-cluster.yaml"

@haarchri
Copy link
Member Author

/test-examples=".up/examples/azure/spoke-cluster.yaml"

@haarchri
Copy link
Member Author

/test-examples=".up/examples/gcp/spoke-cluster.yaml"

Copy link
Member

@ytsarev ytsarev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the fixes, LGTM!

@haarchri haarchri merged commit 0d6fcb2 into upbound:main Sep 15, 2023
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