{
  "description": "DbUser is the Schema for the dbusers 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": "DbUserSpec defines the desired state of DbUser",
      "properties": {
        "accessType": {
          "description": "AccessType that should be given to a user\nCurrently only readOnly and readWrite are supported by the operator",
          "type": "string"
        },
        "cleanup": {
          "type": "boolean"
        },
        "credentials": {
          "description": "Credentials should be used to setup everything relates to k8s secrets and configmaps\nTODO(@allanger): Field .spec.secretName should be moved here in the v1beta2 version",
          "properties": {
            "templates": {
              "description": "Templates to add custom entries to ConfigMaps and Secrets",
              "items": {
                "description": "Tempaltes to add custom entries to ConfigMaps and Secrets",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "secret": {
                    "type": "boolean"
                  },
                  "template": {
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "secret",
                  "template"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "type": "array"
            }
          },
          "type": "object",
          "additionalProperties": false
        },
        "databaseRef": {
          "description": "DatabaseRef should contain a name of a Database to create a user there\nDatabase should be in the same namespace with the user",
          "type": "string"
        },
        "extraPrivileges": {
          "description": "A list of additional roles that should be added to the user",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "grantToAdmin": {
          "default": true,
          "description": "Should the user be granted to the admin user\nFor example, it should be set to true on Azure instance,\nbecause the admin given by them is not a super user,\nbut should be set to false on AWS, when rds_iam extra\nprivilege is added\nBy default is set to true\nOnly applies to Postgres, doesn't have any effect on Mysql\nTODO: Default should be false, but not to introduce breaking\n      changes it's now set to true. It should be changed in\n      in the next API version",
          "type": "boolean"
        },
        "secretName": {
          "description": "SecretName name that should be used to save user's credentials",
          "type": "string"
        }
      },
      "required": [
        "accessType",
        "databaseRef",
        "secretName"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "description": "DbUserStatus defines the observed state of DbUser",
      "properties": {
        "created": {
          "description": "It's required to let the operator update users",
          "type": "boolean"
        },
        "database": {
          "type": "string"
        },
        "operatorVersion": {
          "type": "string"
        },
        "status": {
          "type": "boolean"
        }
      },
      "required": [
        "created",
        "database",
        "status"
      ],
      "type": "object",
      "additionalProperties": false
    }
  },
  "type": "object"
}
