Skip to content

feat: remove deprecated v1beta APIs #106

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
merged 2 commits into from
Jun 28, 2021
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
2 changes: 1 addition & 1 deletion kube-linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ checks:
- host-pid
- mismatching-selector
- no-anti-affinity
- no-extensions-v1beta
- no-liveness-probe
- no-read-only-root-fs
- no-readiness-probe
Expand All @@ -27,7 +28,6 @@ checks:
- unsafe-sysctls
- writable-host-mount
exclude:
- no-extensions-v1beta
- required-annotation-email
- required-label-owner
- unset-cpu-requirements
Expand Down
113 changes: 49 additions & 64 deletions templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ metadata:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: nginx-ingress-clusterrole-{{ .Release.Namespace }}
Expand Down Expand Up @@ -125,7 +125,7 @@ rules:
- list
- watch
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: nginx-ingress-role
Expand Down Expand Up @@ -169,7 +169,7 @@ rules:
verbs:
- get
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: nginx-ingress-role-nisa-binding
Expand All @@ -186,7 +186,7 @@ subjects:
name: nginx-ingress-serviceaccount
namespace: {{ .Release.Namespace | quote }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
# The cluster role binding needs to be namespaced to avoid
Expand Down Expand Up @@ -347,7 +347,7 @@ spec:
{{- end }}
{{- if or .Values.ingress.useDefault .Values.ingress.enable }}
---
apiVersion: extensions/v1beta1
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web-ingress
Expand All @@ -372,88 +372,73 @@ metadata:
{{- end }}
spec:
{{- include "coder.ingress.tls" . }}
backend:
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
defaultBackend:
service:
name: {{ include "coder.serviceName" . }}
port:
number: 8080
{{- if not .Values.coderd.replica.enable }}
rules:
- host: {{ .Values.ingress.host | quote }}
http:
paths:
{{- if or (not .Values.ingress.usePathWildcards) .Values.ingress.useDefault }}
{{- if .Values.ingress.useDefault }}
{{- if hasKey .Values "envproxy" }}
- path: /proxy/
- path: /proxy
pathType: Prefix
backend:
serviceName: envproxy
servicePort: 8080
service:
name: envproxy
port:
number: 8080
{{- end }}
- path: /api/
- path: /api
pathType: Prefix
backend:
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
- path: /auth/
service:
name: {{ include "coder.serviceName" . }}
port:
number: 8080
- path: /auth
pathType: Prefix
backend:
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
service:
name: {{ include "coder.serviceName" . }}
port:
number: 8080
- path: /
pathType: Prefix
backend:
{{- if hasKey .Values "dashboard" }}
serviceName: dashboard
servicePort: 3000
service:
name: dashboard
port:
number: 3000
{{- else }}
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
service:
name: {{ include "coder.serviceName" . }}
port:
number: 8080
{{- end }}
{{- if ne .Values.devurls.host "" }}
{{- if ne .Values.devurls.host "" }}
- host: {{ .Values.devurls.host | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
{{- if hasKey .Values "envproxy" }}
serviceName: envproxy
servicePort: 8080
service:
name: envproxy
port:
number: 8080
{{- else }}
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
service:
name: {{ include "coder.serviceName" . }}
port:
number: 8080
{{- end }}
{{- end }}
{{- else }}
- path: /proxy/*
backend:
serviceName: envproxy
servicePort: 8080
- path: /api/*
backend:
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
- path: /auth/*
backend:
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
- path: /*
backend:
{{- if hasKey .Values "dashboard" }}
serviceName: dashboard
servicePort: 3000
{{- else }}
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
{{- end }}
{{- if ne .Values.devurls.host "" }}
- host: {{ .Values.devurls.host | quote }}
http:
paths:
- path: /*
backend:
{{- if hasKey .Values "envproxy" }}
serviceName: envproxy
servicePort: 8080
{{- else }}
serviceName: {{ include "coder.serviceName" . }}
servicePort: 8080
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
5 changes: 0 additions & 5 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ ingress:
# would like to bring your own ingress and hook Coder into that instead, set
# this value to false.
useDefault: true
# ingress.usePathWildcards -- Whether or not the ingress object should use
# path wildcards, i.e., ending with "/*". Some ingresses require this
# while others do not. You should check which path style your ingress
# requires. For ingress-nginx this should be set to false.
usePathWildcards: false
# ingress.host -- The hostname to use for accessing the platform. This can
# be left blank, and the user can still access the platform from the external
# IP or a DNS name that resolves to the external IP address.
Expand Down