Skip to content

Commit

Permalink
build: update to controller-tools 0.14.0.
Browse files Browse the repository at this point in the history
Update controller-tools to 0.14.0. It handles some errors better
than simply throwing a panic, leaving the user with little to no
hint about what is really wrong.

Regenerate CRDs since this version also generates multiline YAML
strings differently than 0.12.0.

Signed-off-by: Krisztian Litkey <[email protected]>
  • Loading branch information
klihub committed Feb 13, 2024
1 parent 3dc37b2 commit 6467120
Show file tree
Hide file tree
Showing 15 changed files with 339 additions and 263 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ CLIENT_GEN ?= $(LOCALBIN)/client-gen
GIT_CLONE := git clone

# External generation tool versions
CONTROLLER_TOOLS_VERSION ?= v0.12.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
CLIENT_GEN_VERSION ?= v0.28.1
CODE_GENERATOR_REPO ?= https://github.com/kubernetes/code-generator
CODE_GENERATOR_VERSION ?= v0.28.1
Expand Down
176 changes: 100 additions & 76 deletions config/crd/bases/config.nri_balloonspolicies.yaml

Large diffs are not rendered by default.

37 changes: 22 additions & 15 deletions config/crd/bases/config.nri_templatepolicies.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.12.0
controller-gen.kubebuilder.io/version: v0.14.0
name: templatepolicies.config.nri
spec:
group: config.nri
Expand All @@ -21,14 +21,19 @@ spec:
policy.
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
Expand Down Expand Up @@ -79,9 +84,9 @@ spec:
description: Config provides runtime configuration for instrumentation.
properties:
httpEndpoint:
description: HTTPEndpoint is the address our HTTP server listens
on. This endpoint is used to expose Prometheus metrics among
other things.
description: |-
HTTPEndpoint is the address our HTTP server listens on. This endpoint is used
to expose Prometheus metrics among other things.
example: :8891
type: string
prometheusExport:
Expand All @@ -98,11 +103,13 @@ spec:
example: 100000
type: integer
tracingCollector:
description: 'TracingCollector defines the external endpoint for
tracing data collection. Endpoints are specified as full URLs,
or as plain URL schemes which then imply scheme-specific defaults.
The supported schemes and their default URLs are: - otlp-http,
http: localhost:4318 - otlp-grpc, grpc: localhost:4317'
description: |-
TracingCollector defines the external endpoint for tracing data collection.
Endpoints are specified as full URLs, or as plain URL schemes which then
imply scheme-specific defaults. The supported schemes and their default
URLs are:
- otlp-http, http: localhost:4318
- otlp-grpc, grpc: localhost:4317
example: otlp-http://localhost:4318
type: string
type: object
Expand Down
83 changes: 47 additions & 36 deletions config/crd/bases/config.nri_topologyawarepolicies.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.12.0
controller-gen.kubebuilder.io/version: v0.14.0
name: topologyawarepolicies.config.nri
spec:
group: config.nri
Expand All @@ -21,14 +21,19 @@ spec:
policy.
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
Expand All @@ -38,18 +43,20 @@ spec:
availableResources:
additionalProperties:
type: string
description: AvailableResources defines the bounding set for the policy
to allocate resources from.
description: |-
AvailableResources defines the bounding set for the policy to allocate
resources from.
type: object
colocateNamespaces:
description: ColocateNamespaces controls whether an attempt is made
to allocate all containers of pods in a namespace close to each
other (to the same topology zone).
description: |-
ColocateNamespaces controls whether an attempt is made to allocate all
containers of pods in a namespace close to each other (to the same topology
zone).
type: boolean
colocatePods:
description: ColocatePods controls whether an attempt is made to allocate
containers within the same pod close to each other (to the same
topology zone).
description: |-
ColocatePods controls whether an attempt is made to allocate containers
within the same pod close to each other (to the same topology zone).
type: boolean
control:
properties:
Expand Down Expand Up @@ -91,9 +98,9 @@ spec:
description: Config provides runtime configuration for instrumentation.
properties:
httpEndpoint:
description: HTTPEndpoint is the address our HTTP server listens
on. This endpoint is used to expose Prometheus metrics among
other things.
description: |-
HTTPEndpoint is the address our HTTP server listens on. This endpoint is used
to expose Prometheus metrics among other things.
example: :8891
type: string
prometheusExport:
Expand All @@ -110,11 +117,13 @@ spec:
example: 100000
type: integer
tracingCollector:
description: 'TracingCollector defines the external endpoint for
tracing data collection. Endpoints are specified as full URLs,
or as plain URL schemes which then imply scheme-specific defaults.
The supported schemes and their default URLs are: - otlp-http,
http: localhost:4318 - otlp-grpc, grpc: localhost:4317'
description: |-
TracingCollector defines the external endpoint for tracing data collection.
Endpoints are specified as full URLs, or as plain URL schemes which then
imply scheme-specific defaults. The supported schemes and their default
URLs are:
- otlp-http, http: localhost:4318
- otlp-grpc, grpc: localhost:4317
example: otlp-http://localhost:4318
type: string
type: object
Expand Down Expand Up @@ -174,29 +183,31 @@ spec:
type: boolean
preferIsolatedCPUs:
default: true
description: PreferIsolated controls whether kernel-isolated CPUs
are preferred for Guaranteed QoS-class containers that request 1
full CPU.
description: |-
PreferIsolated controls whether kernel-isolated CPUs are preferred for
Guaranteed QoS-class containers that request 1 full CPU.
type: boolean
preferSharedCPUs:
description: PreferShared controls whether exclusive CPU allocation
is considered for all eligible containers. If set to trues, exclusive
CPU allocation is only considered for eligible containers which
are explicitly annotated to opt out from shared allocation.
description: |-
PreferShared controls whether exclusive CPU allocation is considered for
all eligible containers. If set to trues, exclusive CPU allocation is only
considered for eligible containers which are explicitly annotated to opt
out from shared allocation.
type: boolean
reservedPoolNamespaces:
description: ReservedPoolNamespaces lists extra namespaces which are
treated like 'kube-system' (resources allocate from the reserved
pool).
description: |-
ReservedPoolNamespaces lists extra namespaces which are treated like
'kube-system' (resources allocate from the reserved pool).
items:
type: string
type: array
reservedResources:
additionalProperties:
type: string
description: ReservedResources defines the resources reserved namespaces
get assigned to. If AvailableResources is defined, ReservedResources
must be a subset of it.
description: |-
ReservedResources defines the resources reserved namespaces get assigned
to. If AvailableResources is defined, ReservedResources must be a subset
of it.
type: object
required:
- reservedResources
Expand Down
Loading

0 comments on commit 6467120

Please sign in to comment.