Skip to content

Conversation

saeedfazal
Copy link
Contributor

@saeedfazal saeedfazal commented Sep 22, 2022

Closes #1524

What changed?

  • Added Application acceptance tests for management and leaf clusters
  • Extend capd accpeptance tests to add kustomization application to newly created cluster
  • Refactor test code around application for resuability
  • Fixed Policies and violation test due to config change

Why was this change made?
Acceptance test coverage for add kustomization feature.

@saeedfazal saeedfazal self-assigned this Sep 22, 2022
@saeedfazal saeedfazal force-pushed the add-application-test branch 2 times, most recently from c3a629a to 176a2af Compare September 23, 2022 13:21
@saeedfazal saeedfazal requested a review from foot September 23, 2022 13:45
@saeedfazal saeedfazal force-pushed the add-application-test branch 3 times, most recently from 42fd958 to 0d35007 Compare September 25, 2022 20:07
helmArgs+=( --set "policy-agent.accountId=weaveworks" )
helmArgs+=( --set "policy-agent.clusterId=${MANAGEMENT_CLUSTER_CNAME}" )
helmArgs+=( --set "policy-agent.config.accountId=weaveworks" )
helmArgs+=( --set "policy-agent.config.clusterId=${MANAGEMENT_CLUSTER_CNAME}" )
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎉

@@ -148,7 +152,8 @@ function setup {
helmArgs+=( --set "config.git.type=${GIT_PROVIDER}" )
helmArgs+=( --set "config.git.hostname=${GIT_PROVIDER_HOSTNAME}" )
helmArgs+=( --set "config.capi.repositoryURL=${GIT_REPOSITORY_URL}" )
helmArgs+=( --set "config.capi.repositoryPath=./clusters/my-cluster/clusters" )
# using default repository path '"./clusters/management/clusters"' so the application reconciliation always happen out of the box
# helmArgs+=( --set "config.capi.repositoryPath=./clusters/my-cluster/clusters" )
Copy link
Collaborator

Choose a reason for hiding this comment

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

#1475 😬 , will look into it..

@@ -70,7 +70,7 @@ function setup_eks {
--exec-arg=--oidc-issuer-url=${OIDC_ISSUER_URL} \
--exec-arg=--oidc-client-id=${DEX_CLI_CLIENT_ID} \
--exec-arg=--oidc-client-secret=${DEX_CLI_CLIENT_SECRET} \
--exec-arg=--oidc-extra-scope="openid email offline_access" \
--exec-arg=--oidc-extra-scope="openid email groups offline_access" \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have to provide this explicitly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we to explicitly specify the claim in kubeconfig, otherwise groups can't be authenticated.

@@ -1,4 +1,4 @@
apiVersion: pac.weave.works/v1
apiVersion: pac.weave.works/v2beta1
Copy link
Collaborator

Choose a reason for hiding this comment

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

🙏

@@ -11,6 +11,6 @@ identityProviders:
issuerUrl: "{{ISSUER_URL}}"
clientId: "{{CLIENT_ID}}"
usernameClaim: email
usernamePrefix: "-"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah this was the trick to AWS OIDC don't need it anymore?

Copy link
Collaborator

@foot foot left a comment

Choose a reason for hiding this comment

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

💯

@saeedfazal saeedfazal merged commit be28d26 into main Sep 27, 2022
@saeedfazal saeedfazal deleted the add-application-test branch September 27, 2022 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Application acceptance tests
2 participants