Skip to content

Commit

Permalink
chore: update chart with latest add-on changes (#376)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado <[email protected]>

Signed-off-by: Jorge Turrado <[email protected]>
Co-authored-by: Tom Kerkhove <[email protected]>
  • Loading branch information
JorTurFer and tomkerkhove authored Jan 27, 2023
1 parent d4507b2 commit b65806c
Show file tree
Hide file tree
Showing 8 changed files with 82 additions and 78 deletions.
24 changes: 10 additions & 14 deletions http-add-on/templates/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.6.1
controller-gen.kubebuilder.io/version: v0.10.0
creationTimestamp: null
name: httpscaledobjects.http.keda.sh
spec:
Expand All @@ -18,9 +18,6 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.targetPendingRequests
name: TargetPendingRequests
type: integer
- jsonPath: .spec.scaleTargetRef.deploymentName
name: ScaleTargetDeploymentName
type: string
Expand Down Expand Up @@ -80,9 +77,6 @@ spec:
format: int32
type: integer
type: object
targetPendingRequests:
description: Value for the pending requests that the scaler will return to KEDA
type: integer
scaleTargetRef:
description: The name of the deployment to route HTTP requests to
(and to autoscale). Either this or Image must be set
Expand All @@ -103,6 +97,14 @@ spec:
- port
- service
type: object
scaledownPeriod:
description: (optional) Cooldown period value
format: int32
type: integer
targetPendingRequests:
description: (optional) Target metric value
format: int32
type: integer
required:
- host
- scaleTargetRef
Expand Down Expand Up @@ -158,11 +160,5 @@ spec:
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: []
storedVersions: []
{{ end }}
{{ end }}

1 change: 1 addition & 0 deletions http-add-on/templates/deployment-interceptor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ spec:
spec:
imagePullSecrets:
{{- toYaml .Values.interceptor.imagePullSecrets | nindent 8 }}
serviceAccountName: {{ .Chart.Name }}
containers:
- args:
image: "{{ .Values.images.interceptor }}:{{ .Values.images.tag | default .Chart.AppVersion }}"
Expand Down
2 changes: 1 addition & 1 deletion http-add-on/templates/deployment-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spec:
spec:
imagePullSecrets:
{{- toYaml .Values.operator.imagePullSecrets | nindent 8 }}
serviceAccountName: {{ .Chart.Name }}
containers:
- args:
- --secure-listen-address=0.0.0.0:{{ .Values.operator.port | default 8443 }}
Expand Down Expand Up @@ -61,7 +62,6 @@ spec:
value: "{{ .Release.Namespace }}"
- name: KEDA_HTTP_OPERATOR_WATCH_NAMESPACE
value: "{{ .Values.operator.watchNamespace }}"

ports:
- containerPort: {{ .Values.operator.adminPort }}
name: admin-http
Expand Down
1 change: 1 addition & 0 deletions http-add-on/templates/deployment-scaler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ spec:
spec:
imagePullSecrets:
{{- toYaml .Values.scaler.imagePullSecrets | nindent 8 }}
serviceAccountName: {{ .Chart.Name }}
containers:
- args:
image: "{{ .Values.images.scaler }}:{{ .Values.images.tag | default .Chart.AppVersion }}"
Expand Down
96 changes: 38 additions & 58 deletions http-add-on/templates/rbac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,18 @@ metadata:
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}-leader-election-role
app.kubernetes.io/name: {{ .Chart.Name }}-leader-election-role
name: {{ .Chart.Name }}-role
app.kubernetes.io/name: {{ .Chart.Name }}-role
{{- include "keda-addons-http.labels" . | indent 4 }}
name: {{ .Chart.Name }}-leader-election-role
name: {{ .Chart.Name }}-role
namespace: {{ .Release.Namespace }}
rules:
- apiGroups:
- ""
resources:
- configmaps
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
- apiGroups:
- ""
resources:
- configmaps/status
verbs:
- get
- update
- patch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- '*'
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand All @@ -46,19 +26,22 @@ metadata:
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}-manager-role
app.kubernetes.io/name: {{ .Chart.Name }}-manager-role
name: {{ .Chart.Name }}-role
app.kubernetes.io/name: {{ .Chart.Name }}-role
{{- include "keda-addons-http.labels" . | indent 4 }}
name: {{ .Chart.Name }}-manager-role
name: {{ .Chart.Name }}-role
rules:
rules:
- apiGroups:
- ""
resources:
- configmaps
- configmaps/status
- endpoint
- endpoints
- events
- pods
- services
- endpoints
- endpoint
verbs:
- create
- delete
Expand All @@ -76,17 +59,15 @@ rules:
- list
- watch
- apiGroups:
- keda.sh
- coordination.k8s.io
resources:
- scaledobjects
- leases
verbs:
- create
- delete
- get
- list
- update
- patch
- watch
- apiGroups:
- http.keda.sh
resources:
Expand All @@ -108,15 +89,17 @@ rules:
- patch
- update
- apiGroups:
- coordination.k8s.io
- keda.sh
resources:
- leases
- scaledobjects
verbs:
- get
- list
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- networking
resources:
Expand All @@ -131,6 +114,7 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
Expand All @@ -140,18 +124,14 @@ metadata:
{{- include "keda-addons-http.labels" . | indent 4 }}
name: {{ .Chart.Name }}-proxy-role
rules:
- apiGroups:
- authentication.k8s.io
- apiGroups: ["authentication.k8s.io"]
resources:
- tokenreviews
verbs:
- create
- apiGroups:
- authorization.k8s.io
verbs: ["create"]
- apiGroups: ["authorization.k8s.io"]
resources:
- subjectaccessreviews
verbs:
- create
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand All @@ -177,18 +157,18 @@ metadata:
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}-leader-election-binding
app.kubernetes.io/name: {{ .Chart.Name }}-leader-election-binding
name: {{ .Chart.Name }}-role-binding
app.kubernetes.io/name: {{ .Chart.Name }}-role-binding
{{- include "keda-addons-http.labels" . | indent 4 }}
name: {{ .Chart.Name }}-leader-election-rolebinding
name: {{ .Chart.Name }}-role-rolebinding
namespace: {{ .Release.Namespace }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .Chart.Name }}-leader-election-role
name: {{ .Chart.Name }}-role
subjects:
- kind: ServiceAccount
name: default
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -198,17 +178,17 @@ metadata:
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}-manager-rolebinding
app.kubernetes.io/name: {{ .Chart.Name }}-manager-rolebinding
name: {{ .Chart.Name }}-rolebinding
app.kubernetes.io/name: {{ .Chart.Name }}-rolebinding
{{- include "keda-addons-http.labels" . | indent 4 }}
name: {{ .Chart.Name }}-manager-rolebinding
name: {{ .Chart.Name }}-rolebinding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Chart.Name }}-manager-role
name: {{ .Chart.Name }}-role
subjects:
- kind: ServiceAccount
name: default
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
---
apiVersion: rbac.authorization.k8s.io/v1
Expand All @@ -218,8 +198,8 @@ metadata:
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}-proxy-rolebinding
app.kubernetes.io/name: {{ .Chart.Name }}-proxy-rolebinding
name: {{ .Chart.Name }}-rolebinding
app.kubernetes.io/name: {{ .Chart.Name }}-rolebinding
{{- include "keda-addons-http.labels" . | indent 4 }}
name: {{ .Chart.Name }}-proxy-rolebinding
roleRef:
Expand All @@ -228,5 +208,5 @@ roleRef:
name: {{ .Chart.Name }}-proxy-role
subjects:
- kind: ServiceAccount
name: default
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}
19 changes: 14 additions & 5 deletions http-add-on/templates/routing-table-config-map.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: keda-http-routing-table
labels:
"control-plane": "operator"
"keda.sh/addon": "http-add-on"
"app": "http-add-on"
"name": "http-add-on-routing-table"
control-plane: external-scaler
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}-external-scaler
app.kubernetes.io/name: {{ .Chart.Name }}-external-scaler
app.kubernetes.io/version: {{ .Values.images.tag | default .Chart.AppVersion }}
app.kubernetes.io/component: external-scaler
app.kubernetes.io/part-of: {{ .Chart.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{ tpl .Values.additionalLabels . | indent 4}}
name: keda-http-routing-table
namespace: {{ .Release.Namespace }}
data:
# this is where the operator writes the encoded routing table,
# and where the interceptor/scaler reads it
Expand Down
1 change: 1 addition & 0 deletions http-add-on/templates/scaledobject-interceptor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: "{{ .Chart.Name }}-interceptor"
namespace: {{ .Release.Namespace }}
spec:
minReplicaCount: {{ .Values.interceptor.replicas.min }}
maxReplicaCount: {{ .Values.interceptor.replicas.max }}
Expand Down
16 changes: 16 additions & 0 deletions http-add-on/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
httpscaledobjects.http.keda.sh/version: {{ .Values.images.tag | default .Chart.AppVersion }}
keda.sh/addon: {{ .Chart.Name }}
app: {{ .Chart.Name }}
name: {{ .Chart.Name }}
app.kubernetes.io/name: {{ .Chart.Name }}
app.kubernetes.io/version: {{ .Values.images.tag | default .Chart.AppVersion }}
app.kubernetes.io/part-of: {{ .Chart.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{ tpl .Values.additionalLabels . | indent 4}}
name: {{ .Chart.Name }}
namespace: {{ .Release.Namespace }}

0 comments on commit b65806c

Please sign in to comment.