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

Fix IngressClass logic for newer releases #7341

Merged
merged 6 commits into from
Jul 28, 2021
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix chart and admission tests
Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>
  • Loading branch information
rikatz committed Jul 26, 2021
commit 7bd59deed1ff93f58f1e43301363b09c9e7a1943
18 changes: 18 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -116,13 +116,20 @@ jobs:
runs-on: ubuntu-latest
needs:
- changes
- build
if: |
(needs.changes.outputs.charts == 'true')

steps:

- name: Checkout
uses: actions/checkout@v2

- name: cache
uses: actions/download-artifact@v2
with:
name: docker.tar.gz


- name: Lint
run: |
@@ -139,11 +146,22 @@ jobs:
with:
version: v0.11.1
image: kindest/node:v1.21.1

- uses: geekyeggo/delete-artifact@v1
with:
name: docker.tar.gz
failOnError: false

- name: Load images from cache
run: |
echo "loading docker images..."
pigz -dc docker.tar.gz | docker load
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think docker load < docker.tar.gz is enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I'm migrating from the other CI, I wouldn't want to break this right now (don't know if this is a gh action restriction).

But I'm a +1 of opening a good first issue to investigate and maybe remove this :D

Copy link
Member

Choose a reason for hiding this comment

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

OK


- name: Test
env:
KIND_CLUSTER_NAME: kind
SKIP_CLUSTER_CREATION: true
SKIP_IMAGE_CREATION: true
run: |
kind get kubeconfig > $HOME/.kube/kind-config-kind
make kind-e2e-chart-tests
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-customconfig-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
kind: DaemonSet
admissionWebhooks:
enabled: false
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-customnodeport-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false

4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-headers-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
addHeaders:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-internal-lb-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-nodeport-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-podannotations-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
metrics:
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-tcp-udp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/daemonset-tcp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deamonset-default-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deamonset-metrics-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
metrics:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deamonset-psp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deamonset-webhook-and-psp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: true
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deamonset-webhook-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
controller:
kind: DaemonSet
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: true
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-autoscaling-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
autoscaling:
enabled: true
admissionWebhooks:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-customconfig-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
config:
use-proxy-protocol: "true"
admissionWebhooks:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-customnodeport-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-default-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Left blank to test default values
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
service:
type: ClusterIP
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-headers-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
addHeaders:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-internal-lb-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-metrics-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
metrics:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-nodeport-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-podannotations-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
metrics:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-psp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
service:
type: ClusterIP

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-tcp-udp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: false
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-tcp-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
service:
type: ClusterIP

Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: true
service:
4 changes: 4 additions & 0 deletions charts/ingress-nginx/ci/deployment-webhook-values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
controller:
image:
repository: ingress-controller/controller
tag: 1.0.0-dev
digest: null
admissionWebhooks:
enabled: true
service:
6 changes: 3 additions & 3 deletions charts/ingress-nginx/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ rules:
- list
- watch
- apiGroups:
- "networking.k8s.io" # k8s 1.14+
- networking.k8s.io
resources:
- ingresses
verbs:
@@ -57,13 +57,13 @@ rules:
- create
- patch
- apiGroups:
- "networking.k8s.io" # k8s 1.14+
- networking.k8s.io
resources:
- ingresses/status
verbs:
- update
- apiGroups:
- networking.k8s.io # k8s 1.14+
- networking.k8s.io
resources:
- ingressclasses
verbs:
33 changes: 1 addition & 32 deletions charts/ingress-nginx/templates/controller-ingressclass.yaml
Original file line number Diff line number Diff line change
@@ -10,43 +10,12 @@ metadata:
{{- with .Values.controller.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
name: {{ .Values.controller.ingressClass }}
name: {{ .Values.controller.ingressClassResource.name }}
{{- if .Values.controller.ingressClassResource.default }}
annotations:
ingressclass.kubernetes.io/is-default-class: "true"
{{- end }}
spec:
controller: {{ .Values.controller.ingressClassResource.controllerValue }}
{{ template "ingressClass.parameters" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
labels:
{{- include "ingress-nginx.labels" . | nindent 4 }}
name: {{ include "ingress-nginx.ingressclassclrole.fullname" . }}
rules:
- apiGroups:
- networking.k8s.io
resources:
- ingressclasses
verbs:
- get
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
labels:
{{- include "ingress-nginx.labels" . | nindent 4 }}
name: {{ include "ingress-nginx.ingressclassclrole.fullname" . }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "ingress-nginx.ingressclassclrole.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ template "ingress-nginx.serviceAccountName" . }}
namespace: {{ .Release.Namespace | quote }}
{{- end }}
Loading