Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript
7.9 KB
Raw Blame
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: workflowrecipepolicies.clerum.io
  annotations:
    clerum.io/secret-reference-contract: |-
      {
        "version": 1,
        "plural": "workflowrecipepolicies",
        "fields": []
      }
  labels:
    app.kubernetes.io/name: workflowrecipepolicy
    app.kubernetes.io/part-of: clerum
spec:
  group: clerum.io
  names:
    kind: WorkflowRecipePolicy
    listKind: WorkflowRecipePolicyList
    plural: workflowrecipepolicies
    singular: workflowrecipepolicy
    shortNames:
      - wrp
      - policy
  scope: Namespaced
  versions:
    - name: v1alpha1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          description: >-
            WorkflowRecipePolicy defines governance, detection, and deployment
            constraints for WorkflowRecipes within a Context scope. Policies are
            enforced by the Clerum Operator before deploying any recipe.
          required:
            - spec
          properties:
            spec:
              type: object
              properties:
                description:
                  type: string
                  description: Human-readable description of this policy.
                allowContextRef:
                  type: boolean
                  description: >-
                    When true, widens the default-deny on `spec.contextRef` for
                    AGENTIC recipes (those declaring `spec.steps[]`). Per spec
                    §270-271 / §1441, an agentic recipe may reference a shared
                    Context only if BOTH the recipe itself sets
                    `spec.security.allowContextRef: true` AND a matching
                    WorkflowRecipePolicy in the same namespace sets this field
                    to true. Default-deny (field absent or false) blocks
                    agentic workflows from silently reusing first-party MCP
                    servers aggregated in a shared Context.
                governance:
                  type: object
                  description: Governance constraints for recipe deployment.
                  properties:
                    requireApproval:
                      type: boolean
                      description: Whether recipes require approval before deployment.
                    maxWorkloadsPerRecipe:
                      type: integer
                      minimum: 1
                      description: Maximum number of workloads allowed in a single recipe.
                    maxReplicasPerWorkload:
                      type: integer
                      minimum: 1
                      description: Maximum replicas per workload.
                    allowedWorkloadTypes:
                      type: array
                      items:
                        type: string
                        enum:
                          - deployment
                          - statefulset
                          - cronjob
                          - job
                          - daemonset
                      description: Allowed workload types. If empty, all types are allowed.
                    requiredSecurityLevel:
                      type: string
                      enum:
                        - minimal
                        - standard
                        - strict
                      description: >-
                        Minimum required security isolation level. Recipes with
                        a lower level will be rejected.
                detection:
                  type: object
                  description: Image and resource detection constraints.
                  properties:
                    enabled:
                      type: boolean
                      description: Whether detection scanning is enabled.
                    scanOnDeploy:
                      type: boolean
                      description: Whether to scan images on deploy.
                    imageAllowlist:
                      type: array
                      items:
                        type: string
                      description: >-
                        Glob patterns for allowed container images.
                        If set, only matching images are permitted.
                    imageDenylist:
                      type: array
                      items:
                        type: string
                      description: >-
                        Glob patterns for denied container images.
                        Matching images are always rejected.
                    allowedStorageClasses:
                      type: array
                      items:
                        type: string
                      description: Allowed storage classes for PVCs.
                    maxResourceLimits:
                      type: object
                      description: Maximum resource limits per container.
                      properties:
                        cpu:
                          type: string
                        memory:
                          type: string
                publication:
                  type: object
                  description: Registry publication settings.
                  properties:
                    registry:
                      type: string
                      description: Registry URL for recipe publication.
                    autoPublish:
                      type: boolean
                      description: Whether to auto-publish recipes to the registry.
                deployment:
                  type: object
                  description: Deployment behavior configuration.
                  properties:
                    autoPromoteAfterSeconds:
                      type: integer
                      minimum: 0
                      description: Seconds after which to auto-promote from testing to active.
                    rollbackOnFailure:
                      type: boolean
                      description: Whether to auto-rollback on deployment failure.
                    maxConcurrentDeploys:
                      type: integer
                      minimum: 1
                      description: Maximum concurrent recipe deployments.
                notification:
                  type: object
                  description: Notification configuration for recipe lifecycle events.
                  properties:
                    channels:
                      type: array
                      items:
                        type: string
                      description: Notification channel references.
                    events:
                      type: array
                      items:
                        type: string
                        enum:
                          - deploy
                          - rollback
                          - failed
                          - deprecated
                      description: Events that trigger notifications.
                deprecation:
                  type: object
                  description: Recipe deprecation settings.
                  properties:
                    gracePeriodDays:
                      type: integer
                      minimum: 0
                      description: Days before a deprecated recipe is removed.
                    autoDeprecateInactiveDays:
                      type: integer
                      minimum: 0
                      description: Days of inactivity before auto-deprecation.
      additionalPrinterColumns:
        - name: MAX-WORKLOADS
          type: integer
          jsonPath: .spec.governance.maxWorkloadsPerRecipe
          description: Maximum workloads per recipe.
        - name: SECURITY
          type: string
          jsonPath: .spec.governance.requiredSecurityLevel
          description: Required security isolation level.
        - name: Age
          type: date
          jsonPath: .metadata.creationTimestamp