mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-25 14:14:14 +09:00
The field doc filed every mistake under one outcome, a HelmRelease that hangs until its timeout. helm-controller treats them differently. An expression that does not parse is rejected before any Helm action and stalls the release at once, with a named reason. One that parses but errors on the object keeps the wait polling with the CEL error attached, and a current expression that evaluates cleanly but never turns true runs the wait out with no error at all. A read of status errors until the CR's controller writes one, even inside has(), but the wait survives it. A wrong group or kind silently falls back to the built-in readiness rules, and a CR whose CRD is missing fails the Helm action before the wait starts. The text ships in the CRDs and is what kubectl explain shows, so a reader who cannot check it against the controller source was sent to the wrong place for the parse error and the missing CRD. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <f@lex.la>
333 lines
17 KiB
YAML
Generated
333 lines
17 KiB
YAML
Generated
---
|
|
apiVersion: apiextensions.k8s.io/v1
|
|
kind: CustomResourceDefinition
|
|
metadata:
|
|
annotations:
|
|
controller-gen.kubebuilder.io/version: v0.16.4
|
|
name: packagesources.cozystack.io
|
|
spec:
|
|
group: cozystack.io
|
|
names:
|
|
kind: PackageSource
|
|
listKind: PackageSourceList
|
|
plural: packagesources
|
|
shortNames:
|
|
- pks
|
|
singular: packagesource
|
|
scope: Cluster
|
|
versions:
|
|
- additionalPrinterColumns:
|
|
- description: Package variants (comma-separated)
|
|
jsonPath: .status.variants
|
|
name: Variants
|
|
type: string
|
|
- description: Ready status
|
|
jsonPath: .status.conditions[?(@.type=='Ready')].status
|
|
name: Ready
|
|
type: string
|
|
- description: Ready message
|
|
jsonPath: .status.conditions[?(@.type=='Ready')].message
|
|
name: Status
|
|
type: string
|
|
name: v1alpha1
|
|
schema:
|
|
openAPIV3Schema:
|
|
description: PackageSource is the Schema for the packagesources 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: PackageSourceSpec defines the desired state of PackageSource
|
|
properties:
|
|
sourceRef:
|
|
description: SourceRef is the source reference for the package source
|
|
charts
|
|
properties:
|
|
kind:
|
|
description: Kind of the source reference
|
|
enum:
|
|
- GitRepository
|
|
- OCIRepository
|
|
type: string
|
|
name:
|
|
description: Name of the source reference
|
|
type: string
|
|
namespace:
|
|
description: Namespace of the source reference
|
|
type: string
|
|
path:
|
|
description: |-
|
|
Path is the base path where packages are located in the source.
|
|
For GitRepository, defaults to "packages" if not specified.
|
|
For OCIRepository, defaults to empty string (root) if not specified.
|
|
type: string
|
|
required:
|
|
- kind
|
|
- name
|
|
- namespace
|
|
type: object
|
|
variants:
|
|
description: |-
|
|
Variants is a list of package source variants
|
|
Each variant defines components, applications, dependencies, and libraries for a specific configuration
|
|
items:
|
|
description: Variant defines a single variant configuration
|
|
properties:
|
|
components:
|
|
description: Components is a list of Helm releases to be installed
|
|
as part of this variant
|
|
items:
|
|
description: Component defines a single Helm release component
|
|
within a package source
|
|
properties:
|
|
install:
|
|
description: Install defines installation parameters for
|
|
this component
|
|
properties:
|
|
dependsOn:
|
|
description: DependsOn is a list of component names
|
|
that must be installed before this component
|
|
items:
|
|
type: string
|
|
type: array
|
|
healthCheckExprs:
|
|
description: |-
|
|
HealthCheckExprs maps to HelmReleaseSpec.HealthCheckExprs — CEL health
|
|
expressions for the custom resource(s) this component renders, so the
|
|
HelmRelease reports Ready only when the CR is actually healthy. OpenAPI
|
|
validates only the struct shape, so mistakes surface in helm-controller,
|
|
and they do not all fail the same way:
|
|
- An expression that does not parse, an empty current expression, or
|
|
two entries for the same group and kind stall the HelmRelease with
|
|
reason InvalidCELExpression before any Helm action runs.
|
|
- An expression that errors on the object, such as a read of a
|
|
misspelled field or a non-boolean result, does not end the wait: the
|
|
CR reads as Unknown on every poll, and the Helm action waits out its
|
|
timeout with the CEL error in the message. Reading a status field
|
|
errors this way, even inside has(), until the CR's controller writes
|
|
a status; the wait goes on and can still succeed once it does.
|
|
- A current expression that evaluates cleanly but never becomes true,
|
|
such as a comparison against the wrong value, leaves the CR
|
|
InProgress, and the Helm action waits out its timeout with no CEL
|
|
error to point at the expression.
|
|
- A group or kind that does not match the CR the chart renders leaves
|
|
the expressions unused, and that CR is judged by the built-in
|
|
kstatus rules instead.
|
|
A CR whose CRD is not installed fails the Helm action before any wait,
|
|
whatever these expressions say.
|
|
items:
|
|
description: CustomHealthCheck defines the health
|
|
check for custom resources.
|
|
properties:
|
|
apiVersion:
|
|
description: APIVersion of the custom resource
|
|
under evaluation.
|
|
type: string
|
|
current:
|
|
description: |-
|
|
Current is the CEL expression that determines if the status
|
|
of the custom resource has reached the desired state.
|
|
type: string
|
|
failed:
|
|
description: |-
|
|
Failed is the CEL expression that determines if the status
|
|
of the custom resource has failed to reach the desired state.
|
|
type: string
|
|
inProgress:
|
|
description: |-
|
|
InProgress is the CEL expression that determines if the status
|
|
of the custom resource has not yet reached the desired state.
|
|
type: string
|
|
kind:
|
|
description: Kind of the custom resource under
|
|
evaluation.
|
|
type: string
|
|
required:
|
|
- apiVersion
|
|
- current
|
|
- kind
|
|
type: object
|
|
type: array
|
|
namespace:
|
|
description: Namespace is the Kubernetes namespace
|
|
where the release will be installed
|
|
type: string
|
|
privileged:
|
|
description: Privileged indicates whether this release
|
|
requires privileged access
|
|
type: boolean
|
|
releaseName:
|
|
description: |-
|
|
ReleaseName is the name of the HelmRelease resource that will be created
|
|
If not specified, defaults to the component Name field
|
|
type: string
|
|
upgradeCRDs:
|
|
description: |-
|
|
UpgradeCRDs controls how CRDs from the chart's crds/ directory are
|
|
handled on HelmRelease upgrades. Maps to HelmRelease.Spec.Upgrade.CRDs.
|
|
Empty string (default) preserves the helm-controller default (Skip).
|
|
Use "CreateReplace" for operators that evolve their CRD set between
|
|
versions. Warning: CreateReplace overwrites CRDs and may cause data
|
|
loss if upstream drops fields from a CRD with live objects.
|
|
enum:
|
|
- Skip
|
|
- Create
|
|
- CreateReplace
|
|
type: string
|
|
waitStrategy:
|
|
description: |-
|
|
WaitStrategy maps to HelmReleaseSpec.WaitStrategy.Name — a deliberate
|
|
scalar simplification of the upstream {name} object. One of poller|legacy.
|
|
When healthCheckExprs is set and this is empty, the generated HelmRelease
|
|
defaults to poller, because healthCheckExprs are only evaluated under the
|
|
poller wait strategy.
|
|
enum:
|
|
- poller
|
|
- legacy
|
|
type: string
|
|
type: object
|
|
libraries:
|
|
description: |-
|
|
Libraries is a list of library names that this component depends on
|
|
These libraries must be defined at the variant level
|
|
items:
|
|
type: string
|
|
type: array
|
|
name:
|
|
description: Name is the unique identifier for this component
|
|
within the package source
|
|
type: string
|
|
path:
|
|
description: Path is the path to the Helm chart directory
|
|
type: string
|
|
valuesFiles:
|
|
description: ValuesFiles is a list of values file names
|
|
to use
|
|
items:
|
|
type: string
|
|
type: array
|
|
required:
|
|
- name
|
|
- path
|
|
type: object
|
|
type: array
|
|
dependsOn:
|
|
description: |-
|
|
DependsOn is a list of package source dependencies
|
|
For example: "cozystack.networking"
|
|
items:
|
|
type: string
|
|
type: array
|
|
libraries:
|
|
description: Libraries is a list of Helm library charts used
|
|
by components in this variant
|
|
items:
|
|
description: Library defines a Helm library chart
|
|
properties:
|
|
name:
|
|
description: Name is the optional name for library placed
|
|
in charts
|
|
type: string
|
|
path:
|
|
description: Path is the path to the library chart directory
|
|
type: string
|
|
required:
|
|
- path
|
|
type: object
|
|
type: array
|
|
name:
|
|
description: Name is the unique identifier for this variant
|
|
type: string
|
|
required:
|
|
- name
|
|
type: object
|
|
type: array
|
|
type: object
|
|
status:
|
|
description: PackageSourceStatus defines the observed state of PackageSource
|
|
properties:
|
|
conditions:
|
|
description: Conditions represents the latest available observations
|
|
of a PackageSource's state
|
|
items:
|
|
description: Condition contains details for one aspect of the current
|
|
state of this API Resource.
|
|
properties:
|
|
lastTransitionTime:
|
|
description: |-
|
|
lastTransitionTime is the last time the condition transitioned from one status to another.
|
|
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
|
|
format: date-time
|
|
type: string
|
|
message:
|
|
description: |-
|
|
message is a human readable message indicating details about the transition.
|
|
This may be an empty string.
|
|
maxLength: 32768
|
|
type: string
|
|
observedGeneration:
|
|
description: |-
|
|
observedGeneration represents the .metadata.generation that the condition was set based upon.
|
|
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
|
|
with respect to the current state of the instance.
|
|
format: int64
|
|
minimum: 0
|
|
type: integer
|
|
reason:
|
|
description: |-
|
|
reason contains a programmatic identifier indicating the reason for the condition's last transition.
|
|
Producers of specific condition types may define expected values and meanings for this field,
|
|
and whether the values are considered a guaranteed API.
|
|
The value should be a CamelCase string.
|
|
This field may not be empty.
|
|
maxLength: 1024
|
|
minLength: 1
|
|
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
|
|
type: string
|
|
status:
|
|
description: status of the condition, one of True, False, Unknown.
|
|
enum:
|
|
- "True"
|
|
- "False"
|
|
- Unknown
|
|
type: string
|
|
type:
|
|
description: type of condition in CamelCase or in foo.example.com/CamelCase.
|
|
maxLength: 316
|
|
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
|
|
type: string
|
|
required:
|
|
- lastTransitionTime
|
|
- message
|
|
- reason
|
|
- status
|
|
- type
|
|
type: object
|
|
type: array
|
|
variants:
|
|
description: |-
|
|
Variants is a comma-separated list of package variant names
|
|
This field is populated by the controller based on spec.variants keys
|
|
type: string
|
|
type: object
|
|
type: object
|
|
served: true
|
|
storage: true
|
|
subresources:
|
|
status: {}
|