From fd0b26fcf8072816954f73b706043c31b056204b Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Thu, 7 Nov 2024 11:00:01 +0900 Subject: [PATCH] feat: New ScalingSet CRD to deploy isolated interceptors+scalers Signed-off-by: kahirokunn --- README.md | 2 +- http-add-on/Chart.yaml | 4 +- .../templates/crds/clusterhttpscalingset.yaml | 365 ++++++++++++++++++ .../{crd.yaml => crds/httpscaledobject.yaml} | 20 +- .../templates/crds/httpscalingset.yaml | 364 +++++++++++++++++ http-add-on/templates/operator/rbac.yml | 76 ++++ http-add-on/templates/scaler/deployment.yaml | 4 +- 7 files changed, 825 insertions(+), 10 deletions(-) create mode 100644 http-add-on/templates/crds/clusterhttpscalingset.yaml rename http-add-on/templates/{crd.yaml => crds/httpscaledobject.yaml} (93%) create mode 100644 http-add-on/templates/crds/httpscalingset.yaml diff --git a/README.md b/README.md index 87b082e7..871b5e7b 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ $ helm search repo kedacore NAME CHART VERSION APP VERSION DESCRIPTION kedacore/external-scaler-azure-cosmos-db 0.1.0 0.1.0 Event-based autoscaler for Azure Cosmos DB chan... kedacore/keda 2.15.2 2.15.1 Event-based autoscaler for workloads on Kubernetes -kedacore/keda-add-ons-http 0.8.0 0.8.0 Event-based autoscaler for HTTP workloads on Ku... +kedacore/keda-add-ons-http 0.9.0 0.9.0 Event-based autoscaler for HTTP workloads on Ku... ``` ## Releases diff --git a/http-add-on/Chart.yaml b/http-add-on/Chart.yaml index 69448d2a..b370450d 100644 --- a/http-add-on/Chart.yaml +++ b/http-add-on/Chart.yaml @@ -11,12 +11,12 @@ kubeVersion: ">=v1.23.0-0" # to the chart and its templates, including the app version. This is incremented at chart release time and does not need # to be included in any PRs to main. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.8.0 +version: 0.9.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 0.8.0 +appVersion: 0.9.0 home: https://github.com/kedacore/http-add-on sources: - https://github.com/kedacore/http-add-on diff --git a/http-add-on/templates/crds/clusterhttpscalingset.yaml b/http-add-on/templates/crds/clusterhttpscalingset.yaml new file mode 100644 index 00000000..6911c4c5 --- /dev/null +++ b/http-add-on/templates/crds/clusterhttpscalingset.yaml @@ -0,0 +1,365 @@ +{{ if .Values.crds.install }} +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.0 + {{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }} + {{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }} + {{- end }} + name: clusterhttpscalingsets.http.keda.sh +spec: + group: http.keda.sh + names: + kind: ClusterHTTPScalingSet + listKind: ClusterHTTPScalingSetList + plural: clusterhttpscalingsets + shortNames: + - css + singular: clusterhttpscalingset + scope: Cluster + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterHTTPScalingSet is the Schema for the cluster httpscalingset + API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: HTTPScalingSetSpec defines the desired state of HTTPScalingSet + properties: + interceptor: + description: HTTPInterceptorSpec defines the desired state of Interceptor + component + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + type: object + autoscaling: + description: Autoscaling options for the interceptor + properties: + maxReplicas: + default: 100 + description: Maximum replicas for the interceptor + type: integer + minReplicas: + default: 3 + description: Minimum replicas for the interceptor + type: integer + target: + default: 100 + description: Target concurrent requests + type: integer + type: object + config: + description: Traffic configuration + properties: + adminPort: + description: Port to be used for admin operations + format: int32 + type: integer + connectTimeout: + description: Timeout for establishing the connection + type: string + expectContinueTimeout: + description: |- + Max amount of time the interceptor will wait + after sending request headers if the server returned an Expect: 100-continue + header + type: string + forceHTTP2: + description: Try to force HTTP2 for all requests + type: boolean + handshakeTimeout: + description: |- + Max amount of time the interceptor will + wait to establish a TLS connection + type: string + headerTimeout: + description: |- + How long to wait between when the HTTP request + is sent to the backing app and when response headers need to arrive + type: string + idleConnTimeout: + description: |- + Timeout after which a connection in the interceptor's + internal connection pool will be closed + type: string + keepAlive: + description: Interval between keepalive probes + type: string + maxIdleConnections: + description: |- + Max number of connections that can be idle in the + interceptor's internal connection pool + type: integer + pollingInterval: + description: |- + The interceptor has an internal process that periodically fetches the state + of endpoints that is running the servers it forwards to. + This is the interval (in milliseconds) representing how often to do a fetch + type: integer + proxyPort: + description: Port to be used for proxy operations + format: int32 + type: integer + waitTimeout: + description: |- + How long to wait for the backing workload + to have 1 or more replicas before connecting and sending the HTTP request. + type: string + type: object + image: + description: Container image name. + type: string + imagePullSecrets: + description: |- + ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + type: array + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: object + replicas: + description: Number of replicas for the interceptor + format: int32 + type: integer + resources: + description: |- + Compute Resources required by this interceptor. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + + This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. + + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object + serviceAccountName: + default: default + description: Name of the service account to be used + type: string + type: object + scaler: + description: HTTPScalerSpec defines the desired state of Scaler component + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + type: object + config: + default: {} + description: Traffic configuration + properties: + port: + default: 9090 + description: Port to be used for proxy operations + format: int32 + type: integer + type: object + image: + description: Container image name. + type: string + imagePullSecrets: + description: |- + ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + type: array + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: object + replicas: + description: Number of replicas for the interceptor + format: int32 + type: integer + resources: + description: |- + Compute Resources required by this scaler. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + + This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. + + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object + serviceAccountName: + default: default + description: Name of the service account to be used + type: string + type: object + required: + - interceptor + - scaler + type: object + status: + description: HTTPScalingSetStatus defines the observed state of HTTPScalingSet + type: object + type: object + served: true + storage: true + subresources: + status: {} +{{ end }} diff --git a/http-add-on/templates/crd.yaml b/http-add-on/templates/crds/httpscaledobject.yaml similarity index 93% rename from http-add-on/templates/crd.yaml rename to http-add-on/templates/crds/httpscaledobject.yaml index cfb2ef56..8df16807 100644 --- a/http-add-on/templates/crd.yaml +++ b/http-add-on/templates/crds/httpscaledobject.yaml @@ -99,10 +99,6 @@ spec: properties: apiVersion: type: string - deployment: - description: 'Deprecated: The name of the deployment to scale - according to HTTP traffic' - type: string kind: type: string name: @@ -157,6 +153,22 @@ spec: type: string type: object type: object + scalingSet: + description: |- + ScalingSet to be used for this HTTPScaledObject, if empty, default + interceptor and scaler will be used + properties: + kind: + description: Kind of the resource being referred to. Defaults + to HTTPScalingSet. + enum: + - HTTPScalingSet + - ClusterHTTPScalingSet + type: string + name: + description: Name of the scaling set + type: string + type: object targetPendingRequests: description: (optional) DEPRECATED (use ScalingMetric instead) Target metric value diff --git a/http-add-on/templates/crds/httpscalingset.yaml b/http-add-on/templates/crds/httpscalingset.yaml new file mode 100644 index 00000000..53022ca5 --- /dev/null +++ b/http-add-on/templates/crds/httpscalingset.yaml @@ -0,0 +1,364 @@ +{{ if .Values.crds.install }} +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.15.0 + {{- if (or .Values.crds.additionalAnnotations .Values.additionalAnnotations) }} + {{- toYaml (merge .Values.crds.additionalAnnotations .Values.additionalAnnotations) | nindent 4 }} + {{- end }} + name: httpscalingsets.http.keda.sh +spec: + group: http.keda.sh + names: + kind: HTTPScalingSet + listKind: HTTPScalingSetList + plural: httpscalingsets + shortNames: + - ss + singular: httpscalingset + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: HTTPScalingSet is the Schema for the httpscalingset API + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: HTTPScalingSetSpec defines the desired state of HTTPScalingSet + properties: + interceptor: + description: HTTPInterceptorSpec defines the desired state of Interceptor + component + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + type: object + autoscaling: + description: Autoscaling options for the interceptor + properties: + maxReplicas: + default: 100 + description: Maximum replicas for the interceptor + type: integer + minReplicas: + default: 3 + description: Minimum replicas for the interceptor + type: integer + target: + default: 100 + description: Target concurrent requests + type: integer + type: object + config: + description: Traffic configuration + properties: + adminPort: + description: Port to be used for admin operations + format: int32 + type: integer + connectTimeout: + description: Timeout for establishing the connection + type: string + expectContinueTimeout: + description: |- + Max amount of time the interceptor will wait + after sending request headers if the server returned an Expect: 100-continue + header + type: string + forceHTTP2: + description: Try to force HTTP2 for all requests + type: boolean + handshakeTimeout: + description: |- + Max amount of time the interceptor will + wait to establish a TLS connection + type: string + headerTimeout: + description: |- + How long to wait between when the HTTP request + is sent to the backing app and when response headers need to arrive + type: string + idleConnTimeout: + description: |- + Timeout after which a connection in the interceptor's + internal connection pool will be closed + type: string + keepAlive: + description: Interval between keepalive probes + type: string + maxIdleConnections: + description: |- + Max number of connections that can be idle in the + interceptor's internal connection pool + type: integer + pollingInterval: + description: |- + The interceptor has an internal process that periodically fetches the state + of endpoints that is running the servers it forwards to. + This is the interval (in milliseconds) representing how often to do a fetch + type: integer + proxyPort: + description: Port to be used for proxy operations + format: int32 + type: integer + waitTimeout: + description: |- + How long to wait for the backing workload + to have 1 or more replicas before connecting and sending the HTTP request. + type: string + type: object + image: + description: Container image name. + type: string + imagePullSecrets: + description: |- + ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + type: array + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: object + replicas: + description: Number of replicas for the interceptor + format: int32 + type: integer + resources: + description: |- + Compute Resources required by this interceptor. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + + This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. + + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object + serviceAccountName: + default: default + description: Name of the service account to be used + type: string + type: object + scaler: + description: HTTPScalerSpec defines the desired state of Scaler component + properties: + annotations: + additionalProperties: + type: string + description: |- + Annotations is an unstructured key value map stored with a resource that may be + set by external tools to store and retrieve arbitrary metadata. They are not + queryable and should be preserved when modifying objects. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + type: object + config: + default: {} + description: Traffic configuration + properties: + port: + default: 9090 + description: Port to be used for proxy operations + format: int32 + type: integer + type: object + image: + description: Container image name. + type: string + imagePullSecrets: + description: |- + ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. + If specified, these secrets will be passed to individual puller implementations for them to use. + More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod + items: + description: |- + LocalObjectReference contains enough information to let you locate the + referenced object inside the same namespace. + properties: + name: + description: |- + Name of the referent. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid? + type: string + type: object + x-kubernetes-map-type: atomic + type: array + labels: + additionalProperties: + type: string + description: |- + Map of string keys and values that can be used to organize and categorize + (scope and select) objects. May match selectors of replication controllers + and services. + More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: object + replicas: + description: Number of replicas for the interceptor + format: int32 + type: integer + resources: + description: |- + Compute Resources required by this scaler. + Cannot be updated. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + properties: + claims: + description: |- + Claims lists the names of resources, defined in spec.resourceClaims, + that are used by this container. + + + This is an alpha field and requires enabling the + DynamicResourceAllocation feature gate. + + + This field is immutable. It can only be set for containers. + items: + description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + name: + description: |- + Name must match the name of one entry in pod.spec.resourceClaims of + the Pod where this field is used. It makes that resource available + inside a container. + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Limits describes the maximum amount of compute resources allowed. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: |- + Requests describes the minimum amount of compute resources required. + If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, + otherwise to an implementation-defined value. Requests cannot exceed Limits. + More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: object + type: object + serviceAccountName: + default: default + description: Name of the service account to be used + type: string + type: object + required: + - interceptor + - scaler + type: object + status: + description: HTTPScalingSetStatus defines the observed state of HTTPScalingSet + type: object + type: object + served: true + storage: true + subresources: + status: {} +{{ end }} diff --git a/http-add-on/templates/operator/rbac.yml b/http-add-on/templates/operator/rbac.yml index b5a738dd..09b258e7 100644 --- a/http-add-on/templates/operator/rbac.yml +++ b/http-add-on/templates/operator/rbac.yml @@ -39,6 +39,56 @@ metadata: {{- include "keda-http-add-on.labels" . | indent 4 }} name: {{ .Chart.Name }}-role rules: +- apiGroups: + - "" + resources: + - services + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - apps + resources: + - deployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - http.keda.sh + resources: + - clusterhttpscalingsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - http.keda.sh + resources: + - clusterhttpscalingsets/finalizers + verbs: + - update +- apiGroups: + - http.keda.sh + resources: + - clusterhttpscalingsets/status + verbs: + - get + - patch + - update - apiGroups: - http.keda.sh resources: @@ -77,6 +127,32 @@ rules: - patch - update - watch +- apiGroups: + - http.keda.sh + resources: + - httpscalingsets + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - http.keda.sh + resources: + - httpscalingsets/finalizers + verbs: + - update +- apiGroups: + - http.keda.sh + resources: + - httpscalingsets/status + verbs: + - get + - patch + - update --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole diff --git a/http-add-on/templates/scaler/deployment.yaml b/http-add-on/templates/scaler/deployment.yaml index aacc6d38..fbd0a72c 100644 --- a/http-add-on/templates/scaler/deployment.yaml +++ b/http-add-on/templates/scaler/deployment.yaml @@ -18,7 +18,7 @@ spec: app.kubernetes.io/component: scaler {{- include "keda-http-add-on.labels" . | indent 8 }} spec: - imagePullSecrets: + imagePullSecrets: {{- toYaml .Values.scaler.imagePullSecrets | nindent 8 }} serviceAccountName: {{ .Chart.Name }}-external-scaler {{- if .Values.podSecurityContext.scaler }} @@ -40,8 +40,6 @@ spec: - containerPort: {{ .Values.scaler.grpcPort }} name: grpc env: - - name: KEDA_HTTP_SCALER_TARGET_ADMIN_DEPLOYMENT - value: "{{ .Chart.Name }}-interceptor" - name: KEDA_HTTP_SCALER_PORT value: "{{ .Values.scaler.grpcPort }}" - name: KEDA_HTTP_SCALER_TARGET_ADMIN_NAMESPACE