Skip to content

Commit

Permalink
Merge branch 'kedacore:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiritZhou authored Sep 4, 2024
2 parents 20b4552 + 3ab87fb commit 2aa4f8d
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ jobs:
- name: Verify cloudeventsources.eventing.keda.sh CRD is installed
run: kubectl get crd/cloudeventsources.eventing.keda.sh -o wide

- name: Verify clustercloudeventsources.eventing.keda.sh CRD is installed
run: kubectl get crd/clustercloudeventsources.eventing.keda.sh -o wide

- name: Get all ScaledObjects
run: kubectl get scaledobjects -o wide

Expand Down
21 changes: 21 additions & 0 deletions http-add-on/templates/interceptor/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.interceptor.pdb.enabled -}}
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
labels:
app.kubernetes.io/component: interceptor
{{- include "keda-http-add-on.labels" . | indent 4 }}
name: {{ .Chart.Name }}-interceptor
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
app.kubernetes.io/component: interceptor
{{- include "keda-http-add-on.matchLabels" . | indent 6 }}
{{- if .Values.interceptor.pdb.minAvailable }}
minAvailable: {{ .Values.interceptor.pdb.minAvailable }}
{{- end }}
{{- if .Values.interceptor.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.interceptor.pdb.maxUnavailable }}
{{- end }}
{{- end -}}
11 changes: 10 additions & 1 deletion http-add-on/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ operator:
memory: 20Mi

scaler:
# -- Number of replicas
# -- Number of replicas
replicas: 3
# -- The image pull secrets for the scaler component
imagePullSecrets: []
Expand Down Expand Up @@ -193,6 +193,15 @@ interceptor:
# -- Port that the interceptor proxy TLS server should be started on
port: 8443

# configuration of pdb for the interceptor
pdb:
# -- Whether to install the `PodDisruptionBudget` for the interceptor
enabled: true
# -- The minimum number of replicas that should be available for the interceptor
minAvailable: 0
# -- The maximum number of replicas that can be unavailable for the interceptor
maxUnavailable: 1

# configuration for the images to use for each component
images:
# tag is the image tag to use for all images.
Expand Down
142 changes: 142 additions & 0 deletions keda/templates/crds/crd-clustercloudeventsources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{{- if .Values.crds.install }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.13.0
labels:
app.kubernetes.io/name: {{ .Values.operator.name }}
{{- include "keda.crd-labels" . | indent 4 }}
name: clustercloudeventsources.eventing.keda.sh
spec:
group: eventing.keda.sh
names:
kind: ClusterCloudEventSource
listKind: ClusterCloudEventSourceList
plural: clustercloudeventsources
singular: clustercloudeventsource
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .status.conditions[?(@.type=="Active")].status
name: Active
type: string
name: v1alpha1
schema:
openAPIV3Schema:
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: CloudEventSourceSpec defines the spec of CloudEventSource
properties:
authenticationRef:
description: |-
AuthenticationRef points to the TriggerAuthentication or ClusterTriggerAuthentication object that
is used to authenticate the scaler with the environment
properties:
kind:
description: Kind of the resource being referred to. Defaults
to TriggerAuthentication.
type: string
name:
type: string
required:
- name
type: object
clusterName:
type: string
destination:
description: Destination defines the various ways to emit events
properties:
azureEventGridTopic:
properties:
endpoint:
type: string
required:
- endpoint
type: object
http:
properties:
uri:
type: string
required:
- uri
type: object
type: object
eventSubscription:
description: EventSubscription defines filters for events
properties:
excludedEventTypes:
items:
description: CloudEventType contains the list of cloudevent
types
enum:
- keda.scaledobject.ready.v1
- keda.scaledobject.failed.v1
type: string
type: array
includedEventTypes:
items:
description: CloudEventType contains the list of cloudevent
types
enum:
- keda.scaledobject.ready.v1
- keda.scaledobject.failed.v1
type: string
type: array
type: object
required:
- destination
type: object
status:
description: CloudEventSourceStatus defines the observed state of CloudEventSource
properties:
conditions:
description: Conditions an array representation to store multiple
Conditions
items:
description: Condition to store the condition state
properties:
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition
type: string
required:
- status
- type
type: object
type: array
type: object
required:
- spec
type: object
served: true
storage: true
subresources:
status: {}
{{- end -}}
4 changes: 4 additions & 0 deletions keda/templates/manager/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ rules:
resources:
- cloudeventsources
- cloudeventsources/status
- clustercloudeventsources
- clustercloudeventsources/status
verbs:
- '*'
- apiGroups:
Expand Down Expand Up @@ -148,6 +150,7 @@ rules:
- eventing.keda.sh
resources:
- cloudeventsources
- clustercloudeventsources
verbs:
- create
- delete
Expand Down Expand Up @@ -180,6 +183,7 @@ rules:
- eventing.keda.sh
resources:
- cloudeventsources
- clustercloudeventsources
verbs:
- get
- list
Expand Down
3 changes: 2 additions & 1 deletion keda/templates/manager/clusterrolebindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ subjects:
name: {{ (.Values.serviceAccount.operator).name | default .Values.serviceAccount.name }}
namespace: {{ .Release.Namespace }}
{{- else }}
{{- range ( split "," .Values.watchNamespace ) }}
{{- $namespaces := append (splitList "," .Values.watchNamespace) .Release.Namespace -}}
{{- range $namespaces }}
---
# Role binding for namespace '{{ . }}'
apiVersion: rbac.authorization.k8s.io/v1
Expand Down
4 changes: 4 additions & 0 deletions keda/templates/manager/minimal-rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ rules:
verbs:
- create
- update
{{- if .Values.permissions.operator.restrict.secret }}
- list
- watch
{{- end }}
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
Expand Down

0 comments on commit 2aa4f8d

Please sign in to comment.