{
  "description": "ExternalSecret is the Schema for the external-secrets API.",
  "properties": {
    "apiVersion": {
      "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore 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.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds",
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "description": "ExternalSecretSpec defines the desired state of ExternalSecret.",
      "properties": {
        "data": {
          "description": "Data defines the connection between the Kubernetes Secret keys and the Provider data",
          "items": {
            "description": "ExternalSecretData defines the connection between the Kubernetes Secret key (spec.data.<key>) and the Provider data.",
            "properties": {
              "remoteRef": {
                "description": "ExternalSecretDataRemoteRef defines Provider data location.",
                "properties": {
                  "conversionStrategy": {
                    "default": "Default",
                    "description": "Used to define a conversion Strategy",
                    "enum": [
                      "Default",
                      "Unicode"
                    ],
                    "type": "string"
                  },
                  "key": {
                    "description": "Key is the key used in the Provider, mandatory",
                    "type": "string"
                  },
                  "property": {
                    "description": "Used to select a specific property of the Provider value (if a map), if supported",
                    "type": "string"
                  },
                  "version": {
                    "description": "Used to select a specific version of the Provider value, if supported",
                    "type": "string"
                  }
                },
                "required": [
                  "key"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "secretKey": {
                "description": "The key in the Kubernetes Secret to store the value.",
                "maxLength": 253,
                "minLength": 1,
                "pattern": "^[-._a-zA-Z0-9]+$",
                "type": "string"
              }
            },
            "required": [
              "remoteRef",
              "secretKey"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "dataFrom": {
          "description": "DataFrom is used to fetch all properties from a specific Provider data\nIf multiple entries are specified, the Secret keys are merged in the specified order",
          "items": {
            "description": "ExternalSecretDataRemoteRef defines Provider data location.",
            "properties": {
              "conversionStrategy": {
                "default": "Default",
                "description": "Used to define a conversion Strategy",
                "enum": [
                  "Default",
                  "Unicode"
                ],
                "type": "string"
              },
              "key": {
                "description": "Key is the key used in the Provider, mandatory",
                "type": "string"
              },
              "property": {
                "description": "Used to select a specific property of the Provider value (if a map), if supported",
                "type": "string"
              },
              "version": {
                "description": "Used to select a specific version of the Provider value, if supported",
                "type": "string"
              }
            },
            "required": [
              "key"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "refreshInterval": {
          "default": "1h",
          "description": "RefreshInterval is the amount of time before the values are read again from the SecretStore provider\nValid time units are \"ns\", \"us\" (or \"\u00b5s\"), \"ms\", \"s\", \"m\", \"h\"\nMay be set to zero to fetch and create it once. Defaults to 1h.",
          "type": "string"
        },
        "secretStoreRef": {
          "description": "SecretStoreRef defines which SecretStore to fetch the ExternalSecret data.",
          "properties": {
            "kind": {
              "description": "Kind of the SecretStore resource (SecretStore or ClusterSecretStore)\nDefaults to `SecretStore`",
              "enum": [
                "SecretStore",
                "ClusterSecretStore"
              ],
              "type": "string"
            },
            "name": {
              "description": "Name of the SecretStore resource",
              "maxLength": 253,
              "minLength": 1,
              "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
              "type": "string"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "target": {
          "description": "ExternalSecretTarget defines the Kubernetes Secret to be created\nThere can be only one target per ExternalSecret.",
          "properties": {
            "creationPolicy": {
              "default": "Owner",
              "description": "CreationPolicy defines rules on how to create the resulting Secret.\nDefaults to \"Owner\"",
              "enum": [
                "Owner",
                "Merge",
                "None"
              ],
              "type": "string"
            },
            "immutable": {
              "description": "Immutable defines if the final secret will be immutable",
              "type": "boolean"
            },
            "name": {
              "description": "The name of the Secret resource to be managed.\nDefaults to the .metadata.name of the ExternalSecret resource",
              "maxLength": 253,
              "minLength": 1,
              "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
              "type": "string"
            },
            "template": {
              "description": "Template defines a blueprint for the created Secret resource.",
              "properties": {
                "data": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "type": "object"
                },
                "engineVersion": {
                  "default": "v1",
                  "description": "EngineVersion specifies the template engine version\nthat should be used to compile/execute the\ntemplate specified in .data and .templateFrom[].",
                  "enum": [
                    "v1",
                    "v2"
                  ],
                  "type": "string"
                },
                "metadata": {
                  "description": "ExternalSecretTemplateMetadata defines metadata fields for the Secret blueprint.",
                  "properties": {
                    "annotations": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "labels": {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "type": "object"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "templateFrom": {
                  "items": {
                    "maxProperties": 1,
                    "minProperties": 1,
                    "properties": {
                      "configMap": {
                        "properties": {
                          "items": {
                            "description": "A list of keys in the ConfigMap/Secret to use as templates for Secret data",
                            "items": {
                              "properties": {
                                "key": {
                                  "description": "A key in the ConfigMap/Secret",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "pattern": "^[-._a-zA-Z0-9]+$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "key"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "type": "array"
                          },
                          "name": {
                            "description": "The name of the ConfigMap/Secret resource",
                            "maxLength": 253,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "items",
                          "name"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      },
                      "secret": {
                        "properties": {
                          "items": {
                            "description": "A list of keys in the ConfigMap/Secret to use as templates for Secret data",
                            "items": {
                              "properties": {
                                "key": {
                                  "description": "A key in the ConfigMap/Secret",
                                  "maxLength": 253,
                                  "minLength": 1,
                                  "pattern": "^[-._a-zA-Z0-9]+$",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "key"
                              ],
                              "type": "object",
                              "additionalProperties": false
                            },
                            "type": "array"
                          },
                          "name": {
                            "description": "The name of the ConfigMap/Secret resource",
                            "maxLength": 253,
                            "minLength": 1,
                            "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$",
                            "type": "string"
                          }
                        },
                        "required": [
                          "items",
                          "name"
                        ],
                        "type": "object",
                        "additionalProperties": false
                      }
                    },
                    "type": "object",
                    "additionalProperties": false
                  },
                  "type": "array"
                },
                "type": {
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "secretStoreRef",
        "target"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "binding": {
          "description": "Binding represents a servicebinding.io Provisioned Service reference to the secret",
          "properties": {
            "name": {
              "default": "",
              "description": "Name of the referent.\nThis field is effectively required, but due to backwards compatibility is\nallowed to be empty. Instances of this type with an empty value here are\nalmost certainly wrong.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names",
              "type": "string"
            }
          },
          "type": "object",
          "x-kubernetes-map-type": "atomic",
          "additionalProperties": false
        },
        "conditions": {
          "items": {
            "properties": {
              "lastTransitionTime": {
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "status",
              "type"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "refreshTime": {
          "description": "refreshTime is the time and date the external secret was fetched and\nthe target secret updated",
          "format": "date-time",
          "nullable": true,
          "type": "string"
        },
        "syncedResourceVersion": {
          "description": "SyncedResourceVersion keeps track of the last synced version",
          "type": "string"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
