{
  "description": "KubernetesSecretEngineRole is the Schema for the kubernetessecretengineroles 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",
        "null"
      ]
    },
    "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",
        "null"
      ]
    },
    "metadata": {
      "type": [
        "object",
        "null"
      ]
    },
    "spec": {
      "additionalProperties": false,
      "description": "KubernetesSecretEngineRoleSpec defines the desired state of KubernetesSecretEngineRole",
      "properties": {
        "allowedKubernetesNamespaceSelector": {
          "description": "A label selector for Kubernetes namespaces in which credentials can be generated.\nAccepts either a JSON or YAML object. The value should be of type LabelSelector as illustrated: \"'{'matchLabels':{'stage':'prod','sa-generator':'vault'}}\".\nIf set with allowed_kubernetes_namespaces, the conditions are ORed.",
          "type": [
            "string",
            "null"
          ]
        },
        "allowedKubernetesNamespaces": {
          "description": "AllowedKubernetesNamespaces The list of Kubernetes namespaces this role can generate credentials for. If set to \"*\" all namespaces are allowed.\nkubebuilder:validation:UniqueItems=true",
          "items": {
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-type": "set"
        },
        "authentication": {
          "additionalProperties": false,
          "description": "Authentication is the kube auth configuration to be used to execute this request",
          "properties": {
            "namespace": {
              "description": "Namespace is the Vault namespace to be used in all the operations withing this connection/authentication. Only available in Vault Enterprise.",
              "type": [
                "string",
                "null"
              ]
            },
            "path": {
              "default": "kubernetes",
              "description": "Path is the path of the role used for this kube auth authentication. The operator will try to authenticate at {[namespace/]}auth/{spec.path}",
              "pattern": "^(?:/?[\\w;:@\u0026=\\$-\\.\\+]*)+/?",
              "type": [
                "string",
                "null"
              ]
            },
            "role": {
              "description": "Role the role to be used during authentication",
              "type": [
                "string",
                "null"
              ]
            },
            "serviceAccount": {
              "additionalProperties": false,
              "default": {
                "name": "default"
              },
              "description": "ServiceAccount is the service account used for the kube auth authentication",
              "properties": {
                "name": {
                  "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-map-type": "atomic"
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "connection": {
          "additionalProperties": false,
          "description": "Connection represents the information needed to connect to Vault. This operator uses the standard Vault environment variables to connect to Vault. If you need to override those settings and for example connect to a different Vault instance, you can do with this section of the CR.",
          "properties": {
            "address": {
              "description": "Address Address of the Vault server expressed as a URL and port, for example: https://127.0.0.1:8200/",
              "type": [
                "string",
                "null"
              ]
            },
            "maxRetries": {
              "description": "MaxRetries Maximum number of retries when certain error codes are encountered. The default is 2, for three total attempts. Set this to 0 or less to disable retrying. Error codes that are retried are 412 (client consistency requirement not satisfied) and all 5xx except for 501 (not implemented).",
              "type": [
                "integer",
                "null"
              ]
            },
            "tLSConfig": {
              "additionalProperties": false,
              "properties": {
                "cacert": {
                  "description": "Cacert Path to a PEM-encoded CA certificate file on the local disk. This file is used to verify the Vault server's SSL certificate. This environment variable takes precedence over a cert passed via the secret.",
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "skipVerify": {
                  "description": "SkipVerify Do not verify Vault's presented certificate before communicating with it. Setting this variable is not recommended and voids Vault's security model.",
                  "type": [
                    "boolean",
                    "null"
                  ]
                },
                "tlsSecret": {
                  "additionalProperties": false,
                  "description": "TLSSecret namespace-local secret containing the tls material for the connection. the expected keys for the secret are: ca bundle -\u003e \"ca.crt\", certificate -\u003e \"tls.crt\", key -\u003e \"tls.key\"",
                  "properties": {
                    "name": {
                      "description": "Name of the referent.\nMore info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names\nTODO: Add other useful fields. apiVersion, kind, uid?",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": [
                    "object",
                    "null"
                  ],
                  "x-kubernetes-map-type": "atomic"
                },
                "tlsServerName": {
                  "description": "TLSServerName Name to use as the SNI host when connecting via TLS.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ]
            },
            "timeOut": {
              "description": "Timeout Timeout variable. The default value is 60s.",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "type": [
            "object",
            "null"
          ]
        },
        "defaultAudiences": {
          "description": "DefaultAudiences The default intended audiences for generated Kubernetes tokens, specified by a comma separated string. e.g \"custom-audience-0,custom-audience-1\".\nIf not set or set to \"\", the Kubernetes cluster default for audiences of service account tokens will be used.",
          "type": [
            "string",
            "null"
          ]
        },
        "defaultTTL": {
          "default": "0s",
          "description": "DeafulTTL Specifies the TTL for the leases associated with this role. Accepts time suffixed strings (\"1h\") or an integer number of seconds. Defaults to system/engine default TTL time.",
          "type": [
            "string",
            "null"
          ]
        },
        "extraAnnotations": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "ExtraAnnotations Additional annotations to apply to all generated Kubernetes objects. See the Kubernetes annotations documentation for more details on annotations.",
          "type": [
            "object",
            "null"
          ]
        },
        "extraLabels": {
          "additionalProperties": {
            "type": "string"
          },
          "description": "ExtraLabels Additional labels to apply to all generated Kubernetes objects. See the Kubernetes labels documentation for more details on labels.",
          "type": [
            "object",
            "null"
          ]
        },
        "generateRoleRules": {
          "description": "GenerateRoleRules The Role or ClusterRole rules to use when generating a role. Accepts either JSON or YAML formatted rules. If set, the entire chain of Kubernetes objects will be generated when credentials are requested. The value should be a rules key with an array of PolicyRule objects, as illustrated in the Kubernetes RBAC documentation and Sample Payload 3 below.",
          "type": [
            "string",
            "null"
          ]
        },
        "kubernetesRoleName": {
          "description": "KubernetesRoleName The pre-existing Role or ClusterRole to bind a generated service account to. If set, Kubernetes token, service account, and role binding objects will be created when credentials are requested. See the Kubernetes roles documentation for more details on Kubernetes roles.",
          "type": [
            "string",
            "null"
          ]
        },
        "kubernetesRoleType": {
          "default": "Role",
          "description": "KubernetesRoleType Specifies whether the Kubernetes role is a Role or ClusterRole",
          "enum": [
            "Role",
            "ClusterRole"
          ],
          "type": [
            "string",
            "null"
          ]
        },
        "maxTTL": {
          "default": "0s",
          "description": "MaxTTL Specifies the maximum TTL for the leases associated with this role. Accepts time suffixed strings (\"1h\") or an integer number of seconds. Defaults to system/mount default TTL time; this value is allowed to be less than the mount max TTL (or, if not set, the system max TTL), but it is not allowed to be longer. See also The TTL General Case.",
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "description": "The name of the obejct created in Vault. If this is specified it takes precedence over {metatada.name}",
          "pattern": "[a-z0-9]([-a-z0-9]*[a-z0-9])?",
          "type": [
            "string",
            "null"
          ]
        },
        "nameTemplate": {
          "description": "NameTemplate The name template to use when generating service accounts, roles and role bindings. If unset, a default template is used. See username templating for details on how to write a custom template.",
          "type": [
            "string",
            "null"
          ]
        },
        "path": {
          "description": "Path at which to create the role.\nThe final path in Vault will be {[spec.authentication.namespace]}/{spec.path}/roles/{metadata.name}.\nThe authentication role must have the following capabilities = [ \"create\", \"read\", \"update\", \"delete\"] on that path.",
          "pattern": "^(?:/?[\\w;:@\u0026=\\$-\\.\\+]*)+/?",
          "type": [
            "string",
            "null"
          ]
        },
        "serviceAccountName": {
          "description": "ServiceAccountName The pre-existing service account to generate tokens for. Mutually exclusive with all role parameters. If set, only a Kubernetes token will be created when credentials are requested. See the Kubernetes service account documentation for more details on service accounts.",
          "type": [
            "string",
            "null"
          ]
        },
        "targetNamespaces": {
          "additionalProperties": false,
          "description": "TargetNamespaces specifies how to retrieve the list of Kubernetes namespaces this role can generate credentials for.",
          "properties": {
            "targetNamespaceSelector": {
              "additionalProperties": false,
              "description": "TargetNamespaceSelector is a selector of namespaces from which service accounts will receove this role. Either TargetNamespaceSelector or TargetNamespaces can be specified",
              "properties": {
                "matchExpressions": {
                  "description": "matchExpressions is a list of label selector requirements. The requirements are ANDed.",
                  "items": {
                    "additionalProperties": false,
                    "description": "A label selector requirement is a selector that contains values, a key, and an operator that\nrelates 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.\nValid 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,\nthe values array must be non-empty. If the operator is Exists or DoesNotExist,\nthe values array must be empty. This array is replaced during a strategic\nmerge patch.",
                        "items": {
                          "type": "string"
                        },
                        "type": [
                          "array",
                          "null"
                        ]
                      }
                    },
                    "required": [
                      "key",
                      "operator"
                    ],
                    "type": "object"
                  },
                  "type": [
                    "array",
                    "null"
                  ]
                },
                "matchLabels": {
                  "additionalProperties": {
                    "type": "string"
                  },
                  "description": "matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels\nmap is equivalent to an element of matchExpressions, whose key field is \"key\", the\noperator is \"In\", and the values array contains only \"value\". The requirements are ANDed.",
                  "type": [
                    "object",
                    "null"
                  ]
                }
              },
              "type": [
                "object",
                "null"
              ],
              "x-kubernetes-map-type": "atomic"
            },
            "targetNamespaces": {
              "description": "TargetNamespaces is a list of namespace from which service accounts will receive this role. Either TargetNamespaceSelector or TargetNamespaces can be specified.\nkubebuilder:validation:UniqueItems=true",
              "items": {
                "type": "string"
              },
              "minItems": 1,
              "type": [
                "array",
                "null"
              ],
              "x-kubernetes-list-type": "set"
            }
          },
          "type": [
            "object",
            "null"
          ]
        }
      },
      "type": [
        "object",
        "null"
      ]
    },
    "status": {
      "additionalProperties": false,
      "description": "KubernetesSecretEngineRoleStatus defines the observed state of KubernetesSecretEngineRole",
      "properties": {
        "conditions": {
          "description": "INSERT ADDITIONAL STATUS FIELD - define observed state of cluster\nImportant: Run \"make\" to regenerate code after modifying this file",
          "items": {
            "additionalProperties": false,
            "description": "Condition contains details for one aspect of the current state of this API Resource.\n---\nThis struct is intended for direct use as an array at the field path .status.conditions.  For example,\n\n\n\ttype FooStatus struct{\n\t    // Represents the observations of a foo's current state.\n\t    // Known .status.conditions.type are: \"Available\", \"Progressing\", and \"Degraded\"\n\t    // +patchMergeKey=type\n\t    // +patchStrategy=merge\n\t    // +listType=map\n\t    // +listMapKey=type\n\t    Conditions []metav1.Condition `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" protobuf:\"bytes,1,rep,name=conditions\"`\n\n\n\t    // other fields\n\t}",
            "properties": {
              "lastTransitionTime": {
                "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.",
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.",
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.",
                "format": "int64",
                "minimum": 0,
                "type": [
                  "integer",
                  "null"
                ]
              },
              "reason": {
                "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.",
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "description": "status of the condition, one of True, False, Unknown.",
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "description": "type of condition in CamelCase or in foo.example.com/CamelCase.\n---\nMany .condition.type values are consistent across resources like Available, but because arbitrary conditions can be\nuseful (see .node.status.conditions), the ability to deconflict is important.\nThe regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt)",
                "maxLength": 316,
                "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$",
                "type": "string"
              }
            },
            "required": [
              "lastTransitionTime",
              "message",
              "reason",
              "status",
              "type"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ],
          "x-kubernetes-list-map-keys": [
            "type"
          ],
          "x-kubernetes-list-type": "map"
        }
      },
      "type": [
        "object",
        "null"
      ]
    }
  },
  "type": "object"
}