open-cluster-management.io/governance-policy-propagator@v0.13.0/deploy/crds/policy.open-cluster-management.io_policyautomations.yaml (about)

     1  ---
     2  apiVersion: apiextensions.k8s.io/v1
     3  kind: CustomResourceDefinition
     4  metadata:
     5    annotations:
     6      controller-gen.kubebuilder.io/version: v0.14.0
     7    name: policyautomations.policy.open-cluster-management.io
     8  spec:
     9    group: policy.open-cluster-management.io
    10    names:
    11      kind: PolicyAutomation
    12      listKind: PolicyAutomationList
    13      plural: policyautomations
    14      shortNames:
    15      - plca
    16      singular: policyautomation
    17    scope: Namespaced
    18    versions:
    19    - name: v1beta1
    20      schema:
    21        openAPIV3Schema:
    22          description: PolicyAutomation is the Schema for the policyautomations API
    23          properties:
    24            apiVersion:
    25              description: |-
    26                APIVersion defines the versioned schema of this representation of an object.
    27                Servers should convert recognized schemas to the latest internal value, and
    28                may reject unrecognized values.
    29                More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    30              type: string
    31            kind:
    32              description: |-
    33                Kind is a string value representing the REST resource this object represents.
    34                Servers may infer this from the endpoint the client submits requests to.
    35                Cannot be updated.
    36                In CamelCase.
    37                More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    38              type: string
    39            metadata:
    40              type: object
    41            spec:
    42              description: PolicyAutomationSpec defines the desired state of PolicyAutomation
    43              properties:
    44                automationDef:
    45                  description: AutomationDef defines the automation to invoke
    46                  properties:
    47                    extra_vars:
    48                      description: ExtraVars is passed to the Ansible job at execution
    49                        time and is a known Ansible entity.
    50                      type: object
    51                      x-kubernetes-preserve-unknown-fields: true
    52                    jobTtl:
    53                      description: JobTTL sets the time to live for the Kubernetes AnsibleJob
    54                        object after the Ansible job run has finished.
    55                      type: integer
    56                    name:
    57                      description: Name of the Ansible Template to run in Tower as a
    58                        job
    59                      minLength: 1
    60                      type: string
    61                    policyViolationsLimit:
    62                      description: |-
    63                        The maximum number of violating cluster contexts that will be provided to the Ansible job as extra variables.
    64                        When policyViolationsLimit is set to 0, it means no limit.
    65                        The default value is 1000.
    66                      minimum: 0
    67                      type: integer
    68                    secret:
    69                      description: |-
    70                        TowerSecret is the name of the secret that contains the Ansible Automation Platform
    71                        credential.
    72                      minLength: 1
    73                      type: string
    74                    type:
    75                      description: Type of the automation to invoke
    76                      type: string
    77                  required:
    78                  - name
    79                  - secret
    80                  type: object
    81                delayAfterRunSeconds:
    82                  description: |-
    83                    DelayAfterRunSeconds sets the minimum number of seconds before
    84                    an automation can run again due to a new violation on the same
    85                    managed cluster. This only applies to the EveryEvent Mode.  The
    86                    default value is 0.
    87                  minimum: 0
    88                  type: integer
    89                eventHook:
    90                  description: EventHook decides when automation is going to be triggered
    91                  enum:
    92                  - noncompliant
    93                  type: string
    94                mode:
    95                  description: Mode decides how automation is going to be triggered
    96                  enum:
    97                  - once
    98                  - everyEvent
    99                  - disabled
   100                  type: string
   101                policyRef:
   102                  description: |-
   103                    PolicyRef is the name of the policy that this automation resource
   104                    is bound to.
   105                  type: string
   106                rescanAfter:
   107                  description: RescanAfter is reserved for future use.
   108                  type: string
   109              required:
   110              - automationDef
   111              - mode
   112              - policyRef
   113              type: object
   114            status:
   115              description: PolicyAutomationStatus defines the observed state of PolicyAutomation
   116              properties:
   117                clustersWithEvent:
   118                  additionalProperties:
   119                    description: PolicyAutomation events on each target cluster
   120                    properties:
   121                      automationStartTime:
   122                        description: Policy automation start time for everyEvent mode
   123                        type: string
   124                      eventTime:
   125                        description: The last policy compliance transition event time
   126                        type: string
   127                    required:
   128                    - automationStartTime
   129                    - eventTime
   130                    type: object
   131                  description: Cluster name as the key of ClustersWithEvent
   132                  type: object
   133              type: object
   134          required:
   135          - spec
   136          type: object
   137      served: true
   138      storage: true
   139      subresources:
   140        status: {}