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

Add's in the ability to support kind config for ingress-nginx #1243

Merged
merged 2 commits into from
Jan 7, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ jobs:
with:
cluster_name: kind-integration-tests-${{ matrix.language }}
node_image: kindest/node:v1.29.2
config: kind.config.yml
- name: Run tests
run: >-
set -euo pipefail
Expand Down
7 changes: 6 additions & 1 deletion native-provider-ci/src/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1319,20 +1319,25 @@ export function CreateKindCluster(provider: string, name: string): Step {
// Always create a KinD cluster for any jobs in "kubernetes-*" providers.
// For the "kubernetes" provider, create a KinD cluster only for the "run-acceptance-tests" job,
// as other jobs will use GKE clusters for testing.
const step = {
const step: Step = {
name: "Setup KinD cluster",
uses: action.createKindCluster,
with: {
cluster_name: "kind-integration-tests-${{ matrix.language }}",
node_image: "kindest/node:v1.29.2",
...(provider === "kubernetes-ingress-nginx"
? { config: "kind.config.yml" }
: {}),
Comment on lines +1328 to +1330
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused why there'd be a "Setup KinD cluster" step that didn't have a config. What's the behavior in that case? What's special about nginx provider? Asking that you capture the knowledge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Without a config, it just set's up the default. Ingress needs some labels. That comes from:
https://kk-shichao.medium.com/expose-service-using-nginx-ingress-in-kind-cluster-from-wsl2-14492e153e99
https://dustinspecker.com/posts/test-ingress-in-kind/,
should I PR and add those as comments to that section?

},
};

switch (provider) {
case "kubernetes":
return name === "run-acceptance-tests" ? step : {};
case "kubernetes-cert-manager":
return step;
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't want it to fallthrough to step.with.config = "kind.config.yml"; ?

case "kubernetes-coredns":
return step;
case "kubernetes-ingress-nginx":
return step;
}
Expand Down
Loading