-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: end to end testing with coredns provider #5933
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
Merged
k8s-ci-robot
merged 8 commits into
kubernetes-sigs:master
from
Raffo:raffo/local-provider-tests
Nov 19, 2025
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
329c455
end to end testing with local provider implementation
Raffo c814e42
Update .github/workflows/end-to-end-tests.yml
Raffo 41f83f3
Update e2e/deployment.yaml
Raffo f73ad89
move e2e to coredns
Raffo 9f2b802
newlines
Raffo eafeafb
Update scripts/e2e-test.sh
Raffo f0d649f
drop all comments
Raffo 006f5a7
Update .github/workflows/end-to-end-tests.yml
Raffo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| name: end to end test | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| pull_request: | ||
| branches: [ main ] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| e2e-tests: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: e2e | ||
| run: | | ||
| ./scripts/e2e-test.sh | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| labels: | ||
| app: demo-app | ||
| name: demo-app | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: demo-app | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: demo-app | ||
| spec: | ||
| containers: | ||
| - image: traefik/whoami:latest # minimal demo app | ||
| name: demo-app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: coredns | ||
| namespace: default | ||
| data: | ||
| Corefile: | | ||
| external.dns:5353 { | ||
| errors | ||
| log | ||
| etcd { | ||
| stubzones | ||
| path /skydns | ||
| endpoint http://etcd-0.etcd:2379 | ||
| } | ||
| cache 30 | ||
| forward . /etc/resolv.conf | ||
| } | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: coredns | ||
| namespace: default | ||
| labels: | ||
| app: coredns | ||
| spec: | ||
| replicas: 1 | ||
| selector: | ||
| matchLabels: | ||
| app: coredns | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: coredns | ||
| spec: | ||
| hostNetwork: true | ||
| dnsPolicy: Default | ||
| containers: | ||
| - name: coredns | ||
| image: coredns/coredns:1.13.1 | ||
| args: [ "-conf", "/etc/coredns/Corefile" ] | ||
| volumeMounts: | ||
| - name: config-volume | ||
| mountPath: /etc/coredns | ||
| ports: | ||
| - containerPort: 5353 | ||
| name: dns | ||
| protocol: UDP | ||
| - containerPort: 5353 | ||
| name: dns-tcp | ||
| protocol: TCP | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /health | ||
| port: 8080 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 60 | ||
| timeoutSeconds: 5 | ||
| successThreshold: 1 | ||
| failureThreshold: 5 | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /ready | ||
| port: 8181 | ||
| scheme: HTTP | ||
| initialDelaySeconds: 10 | ||
| timeoutSeconds: 5 | ||
| successThreshold: 1 | ||
| failureThreshold: 5 | ||
| volumes: | ||
| - name: config-volume | ||
| configMap: | ||
| name: coredns | ||
| items: | ||
| - key: Corefile | ||
| path: Corefile | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: coredns | ||
| namespace: default | ||
| labels: | ||
| app: coredns | ||
| spec: | ||
| selector: | ||
| app: coredns | ||
| ports: | ||
| - name: dns | ||
| port: 5353 | ||
| targetPort: 5353 | ||
| protocol: UDP | ||
| - name: dns-tcp | ||
| port: 5353 | ||
| targetPort: 5353 | ||
| protocol: TCP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| name: etcd | ||
| namespace: default | ||
| spec: | ||
| type: ClusterIP | ||
| clusterIP: None | ||
| selector: | ||
| app: etcd | ||
| publishNotReadyAddresses: true | ||
| ports: | ||
| - name: etcd-client | ||
| port: 2379 | ||
| - name: etcd-server | ||
| port: 2380 | ||
| - name: etcd-metrics | ||
| port: 8080 | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: StatefulSet | ||
| metadata: | ||
| namespace: default | ||
| name: etcd | ||
| spec: | ||
| serviceName: etcd | ||
| replicas: 1 | ||
| podManagementPolicy: Parallel | ||
| updateStrategy: | ||
| type: RollingUpdate | ||
| selector: | ||
| matchLabels: | ||
| app: etcd | ||
| template: | ||
| metadata: | ||
| labels: | ||
| app: etcd | ||
| annotations: | ||
| serviceName: etcd | ||
| spec: | ||
| affinity: | ||
| podAntiAffinity: | ||
| requiredDuringSchedulingIgnoredDuringExecution: | ||
| - labelSelector: | ||
| matchExpressions: | ||
| - key: app | ||
| operator: In | ||
| values: | ||
| - etcd | ||
| topologyKey: "kubernetes.io/hostname" | ||
| containers: | ||
| - name: etcd | ||
| image: quay.io/coreos/etcd:v3.6.0 | ||
| imagePullPolicy: IfNotPresent | ||
| ports: | ||
| - name: etcd-client | ||
| containerPort: 2379 | ||
| - name: etcd-server | ||
| containerPort: 2380 | ||
| - name: etcd-metrics | ||
| containerPort: 8080 | ||
| readinessProbe: | ||
| httpGet: | ||
| path: /readyz | ||
| port: 8080 | ||
| initialDelaySeconds: 10 | ||
| periodSeconds: 5 | ||
| timeoutSeconds: 5 | ||
| successThreshold: 1 | ||
| failureThreshold: 30 | ||
| livenessProbe: | ||
| httpGet: | ||
| path: /livez | ||
| port: 8080 | ||
| initialDelaySeconds: 15 | ||
| periodSeconds: 10 | ||
| timeoutSeconds: 5 | ||
| failureThreshold: 3 | ||
| env: | ||
| - name: K8S_NAMESPACE | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.namespace | ||
| - name: HOSTNAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.name | ||
| - name: SERVICE_NAME | ||
| valueFrom: | ||
| fieldRef: | ||
| fieldPath: metadata.annotations['serviceName'] | ||
| - name: ETCDCTL_ENDPOINTS | ||
| value: $(HOSTNAME).$(SERVICE_NAME):2379 | ||
| - name: URI_SCHEME | ||
| value: "http" | ||
| command: | ||
| - /usr/local/bin/etcd | ||
| args: | ||
| - --name=$(HOSTNAME) | ||
| - --data-dir=/data | ||
| - --wal-dir=/data/wal | ||
| - --listen-peer-urls=$(URI_SCHEME)://0.0.0.0:2380 | ||
| - --listen-client-urls=$(URI_SCHEME)://0.0.0.0:2379 | ||
| - --advertise-client-urls=$(URI_SCHEME)://$(HOSTNAME).$(SERVICE_NAME):2379 | ||
| - --initial-cluster-state=new | ||
| - --initial-cluster-token=etcd-$(K8S_NAMESPACE) | ||
| - --initial-cluster=etcd-0=$(URI_SCHEME)://etcd-0.$(SERVICE_NAME):2380 | ||
| - --initial-advertise-peer-urls=$(URI_SCHEME)://$(HOSTNAME).$(SERVICE_NAME):2380 | ||
| - --listen-metrics-urls=http://0.0.0.0:8080 | ||
| volumeMounts: | ||
| - name: etcd-data | ||
| mountPath: /data | ||
| volumeClaimTemplates: | ||
| - metadata: | ||
| name: etcd-data | ||
| spec: | ||
| accessModes: ["ReadWriteOnce"] | ||
| resources: | ||
| requests: | ||
| storage: 1Gi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
| labels: | ||
| app: demo-app | ||
| name: demo-app | ||
| annotations: | ||
| external-dns.alpha.kubernetes.io/hostname: externaldns-e2e.external.dns | ||
| spec: | ||
| ports: | ||
| - port: 80 | ||
| protocol: TCP | ||
| targetPort: 8080 | ||
| selector: | ||
| app: demo-app | ||
| clusterIP: None |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.