Skip to content

Commit

Permalink
Add labels and annotations to keda crds (#1141)
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha authored Jul 2, 2024
1 parent 6d754c3 commit a387d40
Show file tree
Hide file tree
Showing 15 changed files with 772 additions and 202 deletions.
83 changes: 58 additions & 25 deletions charts/dbgate/crds/http.keda.sh_httpscaledobjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.15.0
meta.helm.sh/release-name: keda-add-ons-http
meta.helm.sh/release-namespace: keda
labels:
app.kubernetes.io/managed-by: Helm
name: httpscaledobjects.http.keda.sh
spec:
group: http.keda.sh
Expand Down Expand Up @@ -40,36 +44,40 @@ spec:
description: HTTPScaledObject is the Schema for the httpscaledobjects 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'
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'
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: HTTPScaledObjectSpec defines the desired state of HTTPScaledObject
properties:
hosts:
description: The hosts to route. All requests which the "Host" header
matches any .spec.hosts and the Request Target matches any .spec.pathPrefixes
will be routed to the Service and Port specified in the scaleTargetRef.
The .spec.hosts field is mutually exclusive with the .spec.host
field.
description: |-
The hosts to route. All requests which the "Host" header
matches any .spec.hosts (and the Request Target matches any
.spec.pathPrefixes) will be routed to the Service and Port specified in
the scaleTargetRef.
items:
type: string
type: array
pathPrefixes:
description: (optional) The paths to route. All requests which the
Request Target matches any .spec.pathPrefixes and the "Host" header
matches any .spec.hosts will be routed to the Service and Port specified
in the scaleTargetRef. The .spec.hosts field is mutually exclusive
with the .spec.host field. When this field is null, any path is
matched.
description: |-
The paths to route. All requests which the Request Target matches any
.spec.pathPrefixes (and the "Host" header matches any .spec.hosts)
will be routed to the Service and Port specified in
the scaleTargetRef.
items:
type: string
type: array
Expand Down Expand Up @@ -116,8 +124,39 @@ spec:
description: (optional) Cooldown period value
format: int32
type: integer
scalingMetric:
description: (optional) Configuration for the metric used for scaling
properties:
concurrency:
description: Scaling based on concurrent requests for a given
target
properties:
targetValue:
default: 100
description: Target value for rate scaling
type: integer
type: object
requestRate:
description: Scaling based the average rate during an specific
time window for a given target
properties:
granularity:
default: 1s
description: Time granularity for rate calculation
type: string
targetValue:
default: 100
description: Target value for rate scaling
type: integer
window:
default: 1m
description: Time window for rate calculation
type: string
type: object
type: object
targetPendingRequests:
description: (optional) Target metric value
description: (optional) DEPRECATED (use SscalingMetric instead) Target
metric value
format: int32
type: integer
required:
Expand Down Expand Up @@ -154,12 +193,6 @@ spec:
type:
description: Type of condition
enum:
- Created
- Terminated
- Error
- Pending
- Terminating
- Unknown
- Ready
type: string
required:
Expand Down
83 changes: 58 additions & 25 deletions charts/kafka-ui/crds/http.keda.sh_httpscaledobjects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.12.0
controller-gen.kubebuilder.io/version: v0.15.0
meta.helm.sh/release-name: keda-add-ons-http
meta.helm.sh/release-namespace: keda
labels:
app.kubernetes.io/managed-by: Helm
name: httpscaledobjects.http.keda.sh
spec:
group: http.keda.sh
Expand Down Expand Up @@ -40,36 +44,40 @@ spec:
description: HTTPScaledObject is the Schema for the httpscaledobjects 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'
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'
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: HTTPScaledObjectSpec defines the desired state of HTTPScaledObject
properties:
hosts:
description: The hosts to route. All requests which the "Host" header
matches any .spec.hosts and the Request Target matches any .spec.pathPrefixes
will be routed to the Service and Port specified in the scaleTargetRef.
The .spec.hosts field is mutually exclusive with the .spec.host
field.
description: |-
The hosts to route. All requests which the "Host" header
matches any .spec.hosts (and the Request Target matches any
.spec.pathPrefixes) will be routed to the Service and Port specified in
the scaleTargetRef.
items:
type: string
type: array
pathPrefixes:
description: (optional) The paths to route. All requests which the
Request Target matches any .spec.pathPrefixes and the "Host" header
matches any .spec.hosts will be routed to the Service and Port specified
in the scaleTargetRef. The .spec.hosts field is mutually exclusive
with the .spec.host field. When this field is null, any path is
matched.
description: |-
The paths to route. All requests which the Request Target matches any
.spec.pathPrefixes (and the "Host" header matches any .spec.hosts)
will be routed to the Service and Port specified in
the scaleTargetRef.
items:
type: string
type: array
Expand Down Expand Up @@ -116,8 +124,39 @@ spec:
description: (optional) Cooldown period value
format: int32
type: integer
scalingMetric:
description: (optional) Configuration for the metric used for scaling
properties:
concurrency:
description: Scaling based on concurrent requests for a given
target
properties:
targetValue:
default: 100
description: Target value for rate scaling
type: integer
type: object
requestRate:
description: Scaling based the average rate during an specific
time window for a given target
properties:
granularity:
default: 1s
description: Time granularity for rate calculation
type: string
targetValue:
default: 100
description: Target value for rate scaling
type: integer
window:
default: 1m
description: Time window for rate calculation
type: string
type: object
type: object
targetPendingRequests:
description: (optional) Target metric value
description: (optional) DEPRECATED (use SscalingMetric instead) Target
metric value
format: int32
type: integer
required:
Expand Down Expand Up @@ -154,12 +193,6 @@ spec:
type:
description: Type of condition
enum:
- Created
- Terminated
- Error
- Pending
- Terminating
- Unknown
- Ready
type: string
required:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ spec:
type: object
spec:
properties:
description:
type: string
nodeGroups:
items:
properties:
Expand All @@ -47,24 +49,122 @@ spec:
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: 'Allocatable represents the total resources of
a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity'
a node. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#capacity
Deprecated: Use resources instead.'
type: object
cost:
description: Cost is the cost of the running an ondeamd machine
for a month
properties:
price:
type: string
unit:
type: string
required:
- price
- unit
type: object
resources:
description: Resources represents the requested and limited
resources of a machine type.
properties:
claims:
description: "Claims lists the names of resources, defined
in spec.resourceClaims, that are used by this container.
\n This is an alpha field and requires enabling the DynamicResourceAllocation
feature gate. \n 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
topologyValue:
type: string
required:
- allocatable
- topologyValue
type: object
type: array
nodeSelectionPolicy:
enum:
- LabelSelector
- Taint
type: string
requirements:
description: Requirements are layered with GetLabels and applied to
every node.
items:
description: A node selector requirement is a selector that contains
values, a key, and an operator that relates the key and values.
properties:
key:
description: The label key that the selector applies to.
type: string
operator:
description: Represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and
Lt.
type: string
values:
description: An array of string values. If the operator is In
or NotIn, the values array must be non-empty. If the operator
is Exists or DoesNotExist, the values array must be empty.
If the operator is Gt or Lt, the values array must have a
single element, which will be interpreted as an integer. This
array is replaced during a strategic merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
maxItems: 30
type: array
x-kubernetes-validations:
- message: requirements with operator 'In' must have a value defined
rule: 'self.all(x, x.operator == ''In'' ? x.values.size() != 0 :
true)'
- message: requirements operator 'Gt' or 'Lt' must have a single positive
integer value
rule: 'self.all(x, (x.operator == ''Gt'' || x.operator == ''Lt'')
? (x.values.size() == 1 && int(x.values[0]) >= 0) : true)'
topologyKey:
type: string
required:
- nodeSelectionPolicy
- topologyKey
type: object
type: object
Expand Down
Loading

0 comments on commit a387d40

Please sign in to comment.