{{- if .Values.crds.managed }}

---
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.2.9
  name: sidecarsets.apps.kruise.io
spec:
  additionalPrinterColumns:
  - JSONPath: .status.matchedPods
    description: The number of pods matched.
    name: MATCHED
    type: integer
  - JSONPath: .status.updatedPods
    description: The number of pods matched and updated.
    name: UPDATED
    type: integer
  - JSONPath: .status.readyPods
    description: The number of pods matched and ready.
    name: READY
    type: integer
  - JSONPath: .metadata.creationTimestamp
    description: CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.
    name: AGE
    type: date
  group: apps.kruise.io
  names:
    kind: SidecarSet
    listKind: SidecarSetList
    plural: sidecarsets
    singular: sidecarset
  preserveUnknownFields: false
  scope: Cluster
  subresources:
    status: {}
  validation:
    openAPIV3Schema:
      description: SidecarSet is the Schema for the sidecarsets API
      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: SidecarSetSpec defines the desired state of SidecarSet
          properties:
            containers:
              description: Containers is the list of sidecar containers to be injected into the selected pod
              items:
                description: SidecarContainer defines the container of Sidecar
                properties:
                  podInjectPolicy:
                    description: The rules that injected SidecarContainer into Pod.spec.containers, not takes effect in initContainers If BeforeAppContainer, the SidecarContainer will be injected in front of the pod.spec.containers otherwise it will be injected into the back. default BeforeAppContainerType
                    type: string
                  shareVolumePolicy:
                    description: If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts in the pod(don't contains the injected sidecar container).
                    properties:
                      type:
                        type: string
                    type: object
                  transferEnv:
                    description: TransferEnv will transfer env info from other container SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name
                    items:
                      properties:
                        envName:
                          type: string
                        sourceContainerName:
                          type: string
                      type: object
                    type: array
                  upgradeStrategy:
                    description: 'sidecarContainer upgrade strategy, include: ColdUpgrade, HotUpgrade'
                    properties:
                      hotUpgradeEmptyImage:
                        description: when HotUpgrade, HotUpgradeEmptyImage is used to complete the hot upgrading process HotUpgradeEmptyImage is consistent of sidecar container in Command, Args, Liveness probe, etc. but it does no actual work.
                        type: string
                      upgradeType:
                        description: when sidecar container is stateless, use ColdUpgrade otherwise HotUpgrade are more HotUpgrade. examples for istio envoy container is suitable for HotUpgrade default is ColdUpgrade
                        type: string
                    type: object
                type: object
                x-kubernetes-preserve-unknown-fields: true
              type: array
            imagePullSecrets:
              description: List of the names of secrets required by pulling sidecar container images
              items:
                description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              type: array
            initContainers:
              description: Containers is the list of init containers to be injected into the selected pod We will inject those containers by their name in ascending order We only inject init containers when a new pod is created, it does not apply to any existing pod
              items:
                description: SidecarContainer defines the container of Sidecar
                properties:
                  podInjectPolicy:
                    description: The rules that injected SidecarContainer into Pod.spec.containers, not takes effect in initContainers If BeforeAppContainer, the SidecarContainer will be injected in front of the pod.spec.containers otherwise it will be injected into the back. default BeforeAppContainerType
                    type: string
                  shareVolumePolicy:
                    description: If ShareVolumePolicy is enabled, the sidecar container will share the other container's VolumeMounts in the pod(don't contains the injected sidecar container).
                    properties:
                      type:
                        type: string
                    type: object
                  transferEnv:
                    description: TransferEnv will transfer env info from other container SourceContainerName is pod.spec.container[x].name; EnvName is pod.spec.container[x].Env.name
                    items:
                      properties:
                        envName:
                          type: string
                        sourceContainerName:
                          type: string
                      type: object
                    type: array
                  upgradeStrategy:
                    description: 'sidecarContainer upgrade strategy, include: ColdUpgrade, HotUpgrade'
                    properties:
                      hotUpgradeEmptyImage:
                        description: when HotUpgrade, HotUpgradeEmptyImage is used to complete the hot upgrading process HotUpgradeEmptyImage is consistent of sidecar container in Command, Args, Liveness probe, etc. but it does no actual work.
                        type: string
                      upgradeType:
                        description: when sidecar container is stateless, use ColdUpgrade otherwise HotUpgrade are more HotUpgrade. examples for istio envoy container is suitable for HotUpgrade default is ColdUpgrade
                        type: string
                    type: object
                type: object
                x-kubernetes-preserve-unknown-fields: true
              type: array
            injectionStrategy:
              description: InjectionStrategy describe the strategy when sidecarset is injected into pods
              properties:
                paused:
                  description: Paused indicates that SidecarSet will suspend injection into Pods If Paused is true, the sidecarSet will not be injected to newly created Pods, but the injected sidecar container remains updating and running. default is false
                  type: boolean
              type: object
            namespace:
              description: Namespace sidecarSet will only match the pods in the namespace otherwise, match pods in all namespaces(in cluster)
              type: string
            selector:
              description: selector is a label query over pods that should be injected
              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
                    required:
                    - key
                    - operator
                    type: object
                  type: array
                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
            updateStrategy:
              description: The sidecarset updateStrategy to use to replace existing pods with new ones.
              properties:
                maxUnavailable:
                  anyOf:
                  - type: integer
                  - type: string
                  description: 'The maximum number of SidecarSet pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total number of SidecarSet pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up. This cannot be 0. Default value is 1.'
                  x-kubernetes-int-or-string: true
                partition:
                  anyOf:
                  - type: integer
                  - type: string
                  description: Partition is the desired number of pods in old revisions. It means when partition is set during pods updating, (replicas - partition) number of pods will be updated. Default value is 0.
                  x-kubernetes-int-or-string: true
                paused:
                  description: Paused indicates that the SidecarSet is paused to update the injected pods, but it don't affect the webhook inject sidecar container into the newly created pods. default is false
                  type: boolean
                scatterStrategy:
                  description: ScatterStrategy defines the scatter rules to make pods been scattered when update. This will avoid pods with the same key-value to be updated in one batch. - Note that pods will be scattered after priority sort. So, although priority strategy and scatter strategy can be applied together, we suggest to use either one of them. - If scatterStrategy is used, we suggest to just use one term. Otherwise, the update order can be hard to understand.
                  items:
                    properties:
                      key:
                        type: string
                      value:
                        type: string
                    required:
                    - key
                    - value
                    type: object
                  type: array
                selector:
                  description: If selector is not nil, this upgrade will only update the selected pods.
                  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
                        required:
                        - key
                        - operator
                        type: object
                      type: array
                    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
                type:
                  description: Type is NotUpdate, the SidecarSet don't update the injected pods, it will only inject sidecar container into the newly created pods. Type is RollingUpdate, the SidecarSet will update the injected pods to the latest version on RollingUpdate Strategy. default is RollingUpdate
                  type: string
              type: object
            volumes:
              description: List of volumes that can be mounted by sidecar containers
              items:
                description: Volume represents a named volume in a pod that may be accessed by any container in the pod.
                type: object
                x-kubernetes-preserve-unknown-fields: true
              type: array
          type: object
        status:
          description: SidecarSetStatus defines the observed state of SidecarSet
          properties:
            matchedPods:
              description: matchedPods is the number of Pods whose labels are matched with this SidecarSet's selector and are created after sidecarset creates
              format: int32
              type: integer
            observedGeneration:
              description: observedGeneration is the most recent generation observed for this SidecarSet. It corresponds to the SidecarSet's generation, which is updated on mutation by the API Server.
              format: int64
              type: integer
            readyPods:
              description: readyPods is the number of matched Pods that have a ready condition
              format: int32
              type: integer
            updatedPods:
              description: updatedPods is the number of matched Pods that are injected with the latest SidecarSet's containers
              format: int32
              type: integer
            updatedReadyPods:
              description: updatedReadyPods is the number of matched pods that updated and ready
              format: int32
              type: integer
          required:
          - matchedPods
          - readyPods
          - updatedPods
          type: object
      type: object
  version: v1alpha1
  versions:
  - name: v1alpha1
    served: true
    storage: true
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []
{{- end }}
