StyrminDeployment CRD
StyrminDeployment CRD
This page will be generated from the OpenAPI schema embedded in the operator. The text below describes the scope of the page, not its final content.
Until the generation step exists, these files define the CRD:
backend/styrmin_backend/operator/crds/
and the kopf handlers under
backend/styrmin_backend/operator/.
Scope
StyrminDeployment is the custom resource that the operator
reconciles. Its spec contains the embedded GlobalContext, which
describes what must run in the cluster for one deployment.
The page will document each field:
metadata: name, namespace, labels, annotationsspec: the embeddedGlobalContextand each sub-context (cluster,environment,deployment,instance,application,components,utilities)status:phase,conditions,observedGeneration, and the readiness of each component
Annotations
Annotations are not part of the OpenAPI schema, so this section stays when the page is generated.
styrmin.io/instance-sequence: the number of the instance inspec.instanceIdamong the instances of the deployment: 1 for the first instance, then one more for each new instance. Styrmin manages it; do not edit it. A workflow does not replace aStyrminDeploymentthat holds a higher number than its own instance. See Several changes in quick succession for what you see and how to recover after an edit.
Ingress objects that the operator builds
For each service in spec that has scope: external and kind http or
https, the operator creates an Ingress named styrmin-svc-<driver service name>
in the deployment's namespace. It is not part of the HelmRelease. The operator
builds it from the resolved context in its periodic pass, as it does for the
network policies, services and secrets that it builds, and deletes it when the
context no longer requires it. It has six labels:
app.kubernetes.io/managed-by, styrmin.io/utility-kind: ingress,
styrmin.io/release-reference, styrmin.io/service-name,
styrmin/environment_id and styrmin/deployment_id. A dedicated ingress
controller serves only the Ingresses that carry styrmin/environment_id with the
id of its environment, so an Ingress without that label is not served and its
host answers HTTP 404. No condition in status reports on these Ingresses: the
condition types listed below have none for them.
The default interval of the periodic pass is 60 seconds. See The Ingress that Styrmin builds for an external service and Service ingress overrides.
Rollout fields in status
These fields are documented here until the generated reference exists. They describe the rollout that the operator is running:
status.instanceId: the ID of the instance whose spec the operator last handled. The create, update and resume handlers write it, even when the handler fails. The status reporter sends it to the server, and sendsspec.instanceIdfor aStyrminDeploymentthat has nostatus.instanceId.status.rolloutStartedAt: the time when the create or update handler started the current rollout. The readiness timeout counts from it, or frommetadata.creationTimestampwhen it is missing. The resume handler sets it only when it is missing.- The
HelmReleaseReadycondition: set toUnknownwith the reasonProgressingat the start of each rollout. While FluxCD has not reported the current generation of theHelmReleaseas ready, the condition copies the status and transition time of FluxCD'sReadycondition, with the reason and message of the failed install or upgrade when there is one. It becomesTruewith the reasonFluxReadywhen FluxCD reports the current generation as ready. - The
HelmReleaseRemediatedcondition: a copy of FluxCD'sRemediated=Truecondition for the current generation, which means that FluxCD rolled back or uninstalled a failed release. The operator removes it at the start of each rollout.
The condition types are NetworkPoliciesReady, SecretsReady,
HelmReleaseReady, HelmReleaseRemediated, ServicesReady,
MiddlewaresReady, Ready and Deleted. For how the operator uses
them, see
When a rollout is ready or failed.
Generation source
- Schema: the OpenAPI schema of the CRD, which the kopf operator also validates against
- Build step: not defined yet; it will write Markdown from the schema into this file
Related pages
- Concepts and architecture → The operator and
StyrminDeployment: what the operator does with eachStyrminDeployment. - Concepts and architecture → Reconciliation:
how Styrmin turns the
specof aStyrminDeploymentinto Kubernetes resources.