{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "accessControl": {
          "properties": {
            "matchPolicy": {
              "default": "all",
              "enum": [
                "any",
                "all"
              ],
              "type": "string"
            },
            "namespacePatterns": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "podLabels": {
              "additionalProperties": {
                "type": "string"
              },
              "type": "object"
            },
            "podNamePatterns": {
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "serviceAccountPattern": {
              "type": "string"
            }
          },
          "required": [
            "serviceAccountPattern"
          ],
          "type": "object"
        },
        "namespace": {
          "type": "string"
        },
        "secrets": {
          "properties": {
            "transformation": {
              "properties": {
                "excludeRaw": {
                  "type": "boolean"
                },
                "excludes": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "includes": {
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "templates": {
                  "additionalProperties": {
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "text": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "type": "object"
                  },
                  "type": "object"
                },
                "transformationRefs": {
                  "items": {
                    "properties": {
                      "ignoreExcludes": {
                        "type": "boolean"
                      },
                      "ignoreIncludes": {
                        "type": "boolean"
                      },
                      "name": {
                        "type": "string"
                      },
                      "namespace": {
                        "type": "string"
                      },
                      "templateRefs": {
                        "items": {
                          "properties": {
                            "keyOverride": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "type": "object"
            },
            "vaultAppRoleSecretIDs": {
              "items": {
                "properties": {
                  "cidrList": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "metadata": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "mount": {
                    "type": "string"
                  },
                  "numUses": {
                    "type": "integer"
                  },
                  "role": {
                    "type": "string"
                  },
                  "syncRoleID": {
                    "type": "boolean"
                  },
                  "tokenBoundCIDRs": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "transformation": {
                    "properties": {
                      "excludeRaw": {
                        "type": "boolean"
                      },
                      "excludes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "includes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "templates": {
                        "additionalProperties": {
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ],
                          "type": "object"
                        },
                        "type": "object"
                      },
                      "transformationRefs": {
                        "items": {
                          "properties": {
                            "ignoreExcludes": {
                              "type": "boolean"
                            },
                            "ignoreIncludes": {
                              "type": "boolean"
                            },
                            "name": {
                              "type": "string"
                            },
                            "namespace": {
                              "type": "string"
                            },
                            "templateRefs": {
                              "items": {
                                "properties": {
                                  "keyOverride": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "ttl": {
                    "pattern": "^([0-9]+(\\.[0-9]+)?(s|m|h))$",
                    "type": "string"
                  },
                  "wrapTTL": {
                    "pattern": "^([0-9]+(\\.[0-9]+)?(s|m|h))$",
                    "type": "string"
                  }
                },
                "required": [
                  "mount",
                  "role"
                ],
                "type": "object"
              },
              "type": "array"
            },
            "vaultStaticSecrets": {
              "items": {
                "properties": {
                  "mount": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string"
                  },
                  "transformation": {
                    "properties": {
                      "excludeRaw": {
                        "type": "boolean"
                      },
                      "excludes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "includes": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "templates": {
                        "additionalProperties": {
                          "properties": {
                            "name": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "text"
                          ],
                          "type": "object"
                        },
                        "type": "object"
                      },
                      "transformationRefs": {
                        "items": {
                          "properties": {
                            "ignoreExcludes": {
                              "type": "boolean"
                            },
                            "ignoreIncludes": {
                              "type": "boolean"
                            },
                            "name": {
                              "type": "string"
                            },
                            "namespace": {
                              "type": "string"
                            },
                            "templateRefs": {
                              "items": {
                                "properties": {
                                  "keyOverride": {
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "name"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "required": [
                            "name"
                          ],
                          "type": "object"
                        },
                        "type": "array"
                      }
                    },
                    "type": "object"
                  },
                  "type": {
                    "enum": [
                      "kv-v1",
                      "kv-v2"
                    ],
                    "type": "string"
                  },
                  "version": {
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "mount",
                  "path",
                  "type"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "type": "object"
        },
        "syncConfig": {
          "properties": {
            "containerState": {
              "properties": {
                "imagePattern": {
                  "type": "string"
                },
                "namePattern": {
                  "type": "string"
                }
              },
              "type": "object"
            }
          },
          "required": [
            "containerState"
          ],
          "type": "object"
        },
        "vaultAuthRef": {
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            },
            "trustNamespace": {
              "type": "boolean"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        }
      },
      "required": [
        "accessControl",
        "secrets"
      ],
      "type": "object"
    },
    "status": {
      "properties": {
        "conditions": {
          "items": {
            "properties": {
              "lastTransitionTime": {
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "maxLength": 32768,
                "type": "string"
              },
              "observedGeneration": {
                "format": "int64",
                "minimum": 0,
                "type": "integer"
              },
              "reason": {
                "maxLength": 1024,
                "minLength": 1,
                "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$",
                "type": "string"
              },
              "status": {
                "enum": [
                  "True",
                  "False",
                  "Unknown"
                ],
                "type": "string"
              },
              "type": {
                "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"
        }
      },
      "type": "object"
    }
  },
  "type": "object"
}
