Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
291 changes: 291 additions & 0 deletions charts/templates/workload.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,51 @@ spec:
type: string
type: object
x-kubernetes-map-type: atomic
desiredAgent:
description: |-
DesiredAgent, when set, drives a managed agent upgrade on this host.
The three fields below are always set together by the
ByoHostAgentUpgrade rollout controller; nil means no managed upgrade
is in progress.
properties:
assignedAt:
description: |-
AssignedAt is when the ByoHostAgentUpgrade rollout controller set
this field, used to measure elapsed time against
ByoHostAgentUpgradeSpec.PerHostTimeout. Only the controller reads or
writes it; the agent ignores it.
format: date-time
type: string
packageChecksum:
description: |-
PackageChecksum, if set, is the expected checksum ("sha256:<hex>") of
the specific .deb/.rpm file extracted from the PackageURL bundle —
not of the OCI image itself, which digest-pinning the reference
above already covers. The agent refuses to install on mismatch.
type: string
packageURL:
description: |-
PackageURL is an OCI image reference — pulled via `imgpkg pull` — for
a bundle containing the .deb/.rpm that installs Version. Not
templated and does not reference a Secret — an image reference is
not sensitive. The agent extracts the bundle, picks the single *.deb
or *.rpm inside it matching its own already-known package manager,
and installs it; nothing else is executed. Never used to install a
version older than the one currently running — that always requires
manual (SSH/Ansible) intervention outside this field. Pinning this
reference by digest (@sha256:...) rather than a mutable tag is the
primary integrity mechanism; see PackageChecksum for a secondary
check.
type: string
version:
description: |-
Version is the agent version this host should be running. The agent
compares this against its own version.Get().GitVersion on every
reconcile tick and only acts on a mismatch.
type: string
required:
- version
type: object
installationSecret:
description: |-
InstallationSecret is an optional reference to InstallationSecret
Expand Down Expand Up @@ -384,6 +429,249 @@ spec:
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
labels:
cluster.x-k8s.io/provider: infrastructure-byoh
cluster.x-k8s.io/v1beta1: v1beta1
name: byohostagentupgrades.infrastructure.cluster.x-k8s.io
spec:
group: infrastructure.cluster.x-k8s.io
names:
kind: ByoHostAgentUpgrade
listKind: ByoHostAgentUpgradeList
plural: byohostagentupgrades
shortNames:
- byohau
singular: byohostagentupgrade
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.phase
name: Phase
type: string
- jsonPath: .spec.targetVersion
name: Target
type: string
- jsonPath: .status.upgraded
name: Upgraded
type: string
- jsonPath: .status.total
name: Total
type: string
name: v1beta1
schema:
openAPIV3Schema:
description: |-
ByoHostAgentUpgrade is the Schema for the byohostagentupgrades API. See
docs/proposals/agent-self-upgrade-adr.md §2.3.
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: ByoHostAgentUpgradeSpec defines the desired state of ByoHostAgentUpgrade.
properties:
maxUnavailable:
anyOf:
- type: integer
- type: string
description: |-
MaxUnavailable bounds |InFlight ∪ Disconnected| - hosts this rollout
is actively upgrading, plus hosts unavailable for any other reason -
at any single point in time. Defaults to 1 if unset.
x-kubernetes-int-or-string: true
packageChecksum:
description: |-
PackageChecksum, if set, is the expected checksum ("sha256:<hex>") of
the .deb/.rpm extracted from the PackageURL bundle.
type: string
packageURL:
description: |-
PackageURL is an OCI image reference - pulled via `imgpkg pull`, the
same mechanism ByoHostSpec.DesiredAgent.PackageURL uses - for the
bundle containing this cohort's .deb/.rpm. All hosts matched by
Selector must share the same package family (HostOSFamilyLabel); this
is not validated here (see the ADR's open question on that gap).
type: string
perHostTimeout:
description: |-
PerHostTimeout bounds how long a host may stay in flight (assigned
DesiredAgent but not yet converged, and not yet explicitly
failed) before this rollout considers it failed. Defaults to 10m if
unset.
type: string
selector:
description: |-
Selector selects which ByoHosts, within this object's own namespace,
this rollout targets. Namespace boundaries provide isolation - there
is no separate tenant/cohort concept: create this object in the
namespace you want upgraded, and further narrow with Selector (e.g.
by HostArchitectureLabel/HostOSFamilyLabel for a mixed fleet, or
clusterv1.ClusterNameLabel for a single ByoCluster's hosts).
properties:
matchExpressions:
description: matchExpressions is a list of label selector requirements. The requirements are ANDed.
items:
description: |-
A label selector requirement is a selector that contains values, a key, and an operator that
relates the key and values.
properties:
key:
description: key is the label key that the selector applies to.
type: string
operator:
description: |-
operator represents a key's relationship to a set of values.
Valid operators are In, NotIn, Exists and DoesNotExist.
type: string
values:
description: |-
values is 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. This array is replaced during a strategic
merge patch.
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- key
- operator
type: object
type: array
x-kubernetes-list-type: atomic
matchLabels:
additionalProperties:
type: string
description: |-
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
map is equivalent to an element of matchExpressions, whose key field is "key", the
operator is "In", and the values array contains only "value". The requirements are ANDed.
type: object
type: object
x-kubernetes-map-type: atomic
targetVersion:
description: |-
TargetVersion is the agent version this rollout converges selected
hosts to. Must be an explicit, fully-resolved version - never
"latest" or any other floating reference - enforced here rather than
by convention.
pattern: ^v[0-9]+\.[0-9]+(\.[0-9]+)?(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$
type: string
required:
- packageURL
- selector
- targetVersion
type: object
status:
description: ByoHostAgentUpgradeStatus defines the observed state of ByoHostAgentUpgrade.
properties:
conditions:
description: Conditions provide observations of the operational state of a Cluster API resource.
items:
description: Condition defines an observation of a Cluster API resource operational state.
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 field may be empty.
maxLength: 10240
minLength: 1
type: string
reason:
description: |-
reason is the reason for the condition's last transition in CamelCase.
The specific API may choose whether or not this field is considered a guaranteed API.
This field may be empty.
maxLength: 256
minLength: 1
type: string
severity:
description: |-
severity provides an explicit classification of Reason code, so the users or machines can immediately
understand the current situation and act accordingly.
The Severity field MUST be set only when Status=False.
maxLength: 32
type: string
status:
description: status of the condition, one of True, False, Unknown.
type: string
type:
description: |-
type of condition in CamelCase or in foo.example.com/CamelCase.
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
can be useful (see .node.status.conditions), the ability to deconflict is important.
maxLength: 256
minLength: 1
type: string
required:
- lastTransitionTime
- status
- type
type: object
type: array
failedHosts:
description: |-
FailedHosts lists hosts that explicitly failed (AgentUpgradeSucceeded
== False) or timed out. Once populated, Phase is Failed and stays
Failed - this list is never used to retry automatically.
items:
type: string
type: array
phase:
description: |-
ByoHostAgentUpgradePhase is the coarse-grained state of a
ByoHostAgentUpgrade rollout.
type: string
total:
description: Total is the number of ByoHosts currently matching Selector.
format: int32
type: integer
unavailableCount:
description: |-
UnavailableCount is the most recently computed
|InFlight ∪ Disconnected|, exposed for observability rather than kept
purely internal.
format: int32
type: integer
upgraded:
description: |-
Upgraded is the number of matched hosts that have converged on
TargetVersion.
format: int32
type: integer
type: object
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.21.0
Expand Down Expand Up @@ -1463,6 +1751,7 @@ rules:
- '*'
- bootstrapkubeconfigs
- byoclusters
- byohostagentupgrades
- byohosts
- byomachines
- byomachinetemplates
Expand All @@ -1480,6 +1769,7 @@ rules:
resources:
- bootstrapkubeconfigs/finalizers
- byoclusters/finalizers
- byohostagentupgrades/finalizers
- byohosts/finalizers
- byomachines/finalizers
- byomachinetemplates/finalizers
Expand All @@ -1491,6 +1781,7 @@ rules:
resources:
- bootstrapkubeconfigs/status
- byoclusters/status
- byohostagentupgrades/status
- byohosts/status
- byomachines/status
- byomachinetemplates/status
Expand Down
Loading