Operator

CRD Reference

Complete App CRD type definitions

CRD Reference

Complete reference for the App custom resource — cd.wardn.space/v1alpha1, kind App, namespaced. Generated from operator/api/v1alpha1/app_types.go.

AppSpec

type AppSpec struct {
    Source        Source              `json:"source"`
    Destination   Destination         `json:"destination"`
    SyncPolicy    *SyncPolicy         `json:"syncPolicy,omitempty"`
    Freeze        bool                `json:"freeze,omitempty"`
    Notifications *NotificationConfig `json:"notifications,omitempty"`
    Webhook       *WebhookConfig      `json:"webhook,omitempty"`
    Operation     *Operation          `json:"operation,omitempty"`
}

Source

Union type — a CEL rule enforces exactly one block matching type:

type Source struct {
    Type      SourceType       `json:"type"`
    Git       *GitSource       `json:"git,omitempty"`
    Image     *ImageSource     `json:"image,omitempty"`
    HelmChart *HelmChartSource `json:"helmChart,omitempty"`
    Catalog   *CatalogSource   `json:"catalog,omitempty"`
}

type SourceType string

const (
    SourceTypeGit       SourceType = "Git"
    SourceTypeImage     SourceType = "Image"
    SourceTypeHelmChart SourceType = "HelmChart"  // 📋 reserved
    SourceTypeCatalog   SourceType = "Catalog"    // 📋 reserved
)

GitSource

type GitSource struct {
    RepoURL       string            `json:"repoURL"`
    Branch        string            `json:"branch"`
    Path          string            `json:"path"`
    ManifestType  ManifestType      `json:"manifestType,omitempty"`  // Auto|Raw|Helm|Kustomize
    Helm          *HelmConfig       `json:"helm,omitempty"`
    Kustomize     *KustomizeConfig  `json:"kustomize,omitempty"`
    Substitution  map[string]string `json:"substitution,omitempty"`
    // 📋 no CredentialRef yet — public repos only
}
FieldDescription
repoURLGit URL — cloned with the git binary; public repos only today
branchTracked branch
pathManifest directory within the repo
manifestTypeAuto (detect kustomization.yaml/Chart.yaml), Raw, Kustomize, Helm 📋
helmvaluesFile, releaseName, namespace, inlineValues — 📋 renderer not wired
kustomizeimages (newName=newTag), namePrefix, components
substitution${VAR} map applied post-build

ImageSource

type ImageSource struct {
    Repository    string            `json:"repository"`
    Tag           string            `json:"tag"`
    TagPolicy     TagPolicy         `json:"tagPolicy,omitempty"`   // Pin|Follow
    RegistryRef   string            `json:"registryRef,omitempty"` // server /registries entry
    PullSecretRef string            `json:"pullSecretRef,omitempty"`
    Workload      WorkloadConfig    `json:"workload,omitempty"`
    Ingress       *IngressConfig    `json:"ingress,omitempty"`
    Autoscaling   *AutoscalingConfig `json:"autoscaling,omitempty"`
}

TagPolicy: Pin (deploy only via POST /deploy) | Follow (server poller re-resolves every WARDN_TAG_POLL_INTERVAL).

WorkloadConfig: port, replicas, env ({name,value} / {name,secretRef:{name,key}} / {name,store:{id,path,key}}), resources, probe (disabled,path,initialDelaySeconds,periodSeconds,failureThreshold).

IngressConfig: enabled, host, path, className, annotations, tls (secretName, hosts).

AutoscalingConfig: enabled, minReplicas, maxReplicas, targetCPUUtilization, targetMemoryUtilization, scaleToZero 📋 reserved.

HelmChartSource — 📋 schema only

repoURL, chart, version, values — no resolver.

CatalogSource — 📋 schema only

template, params — no resolver.

Destination

type Destination struct {
    Namespace string `json:"namespace"`
    Cluster   string `json:"cluster,omitempty"`
}

cluster empty → management cluster; a name → kubeconfig fetched from the server.

SyncPolicy

type SyncPolicy struct {
    Automated        bool `json:"automated,omitempty"`
    Prune            bool `json:"prune,omitempty"`
    SelfHeal         bool `json:"selfHeal,omitempty"`         // 📋 unwired
    RequiresApproval bool `json:"requiresApproval,omitempty"`
}

NotificationConfig

type NotificationConfig struct {
    Slack            *SlackConfig `json:"slack,omitempty"`
    OnSyncSuccess    bool         `json:"onSyncSuccess,omitempty"`
    OnSyncFailure    bool         `json:"onSyncFailure,omitempty"`
    OnHealthDegraded bool         `json:"onHealthDegraded,omitempty"` // 📋 unwired
}

WebhookConfig

type WebhookConfig struct {
    Enabled   bool   `json:"enabled,omitempty"`
    SecretRef string `json:"secretRef,omitempty"` // 📋 signature validation unwired
}

Operation — the async-action contract

Written by the wardn API, consumed by the operator:

type Operation struct {
    Kind        OperationKind `json:"kind"`         // Sync|Deploy|Rollback|Restart|Approve
    InitiatedAt metav1.Time   `json:"initiatedAt"`
    ID          string        `json:"id,omitempty"`            // correlation UUID
    Revision    string        `json:"revision,omitempty"`      // Rollback target
    Tag         string        `json:"tag,omitempty"`           // Deploy tag
    DryRun      bool          `json:"dryRun,omitempty"`        // 📋 unwired
    TriggeredBy string        `json:"triggeredBy,omitempty"`   // "api:user", "webhook:github", "tag-poller"
    Message     string        `json:"message,omitempty"`
}

AppStatus

type AppStatus struct {
    SyncStatus        SyncStatus          `json:"syncStatus"`
    HealthStatus      HealthStatus        `json:"healthStatus"`
    HealthReason      string              `json:"healthReason,omitempty"`
    LastSyncAt        *metav1.Time        `json:"lastSyncAt,omitempty"`
    Revision          string              `json:"revision,omitempty"`          // last applied
    ObservedRevision  string              `json:"observedRevision,omitempty"`  // newest seen
    PreviousRevisions []string            `json:"previousRevisions,omitempty"`
    ObjectHash        string              `json:"objectHash,omitempty"`        // sha256 of rendered set
    Resources         []ResourceStatus    `json:"resources,omitempty"`
    URL               string              `json:"url,omitempty"`               // ingress public URL
    OperationState    *OperationState     `json:"operationState,omitempty"`
    Conditions        []metav1.Condition  `json:"conditions,omitempty"`
}

Enums

// SyncStatus: Synced | OutOfSync | Syncing (reserved) | Unknown
// HealthStatus: Healthy | Degraded | Progressing | Missing | Unknown
// OperationPhase: Pending | Succeeded | Failed | Held | Skipped
// ConditionTypes: Ready | SyncError

ResourceStatus

type ResourceStatus struct {
    APIVersion  string       `json:"apiVersion"`
    Kind        string       `json:"kind"`
    Namespace   string       `json:"namespace"`
    Name        string       `json:"name"`
    SyncStatus  SyncStatus   `json:"syncStatus"`
    HealthStatus HealthStatus `json:"healthStatus"`
    Message     string       `json:"message,omitempty"`
}

Complete Example

apiVersion: cd.wardn.space/v1alpha1
kind: App
metadata:
  name: full-example
  namespace: org-my-org
spec:
  source:
    type: Git
    git:
      repoURL: https://github.com/myorg/my-app
      branch: main
      path: k8s/production
      manifestType: Auto
      kustomize:
        namePrefix: prod-
      substitution:
        ENV: production
  destination:
    cluster: prod-cluster
    namespace: production
  syncPolicy:
    automated: true
    prune: true
    requiresApproval: true
  notifications:
    slack:
      webhookURL: https://hooks.slack.com/services/...
    onSyncFailure: true
  webhook:
    enabled: true
status:
  syncStatus: Synced
  healthStatus: Healthy
  revision: a1b2c3d4e5f6
  observedRevision: f6e5d4c3b2a1
  objectHash: sha256:…
  previousRevisions: [f6e5d4c3b2a1]
  url: ""
  operationState:
    kind: Sync
    phase: Succeeded
    triggeredBy: "api:user"
  resources:
    - apiVersion: apps/v1
      kind: Deployment
      name: my-app
      namespace: production
      syncStatus: Synced
      healthStatus: Healthy
  conditions:
    - type: Ready
      status: "True"
      reason: SyncSuccessful

On this page