move mysql operator and cluster
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.7.0
|
||||
name: mysqlbackups.mysql.presslabs.org
|
||||
labels:
|
||||
app.kubernetes.io/name: mysql-operator
|
||||
spec:
|
||||
group: mysql.presslabs.org
|
||||
names:
|
||||
kind: MysqlBackup
|
||||
listKind: MysqlBackupList
|
||||
plural: mysqlbackups
|
||||
singular: mysqlbackup
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: MysqlBackup is the Schema for the mysqlbackups 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: MysqlBackupSpec defines the desired state of MysqlBackup
|
||||
properties:
|
||||
backupSecretName:
|
||||
description: BackupSecretName the name of secrets that contains the credentials to access the bucket. Default is used the secret specified in cluster.
|
||||
type: string
|
||||
backupURL:
|
||||
description: BackupURL represents the URL to the backup location, this can be partially specifyied. Default is used the one specified in the cluster.
|
||||
type: string
|
||||
clusterName:
|
||||
description: ClustterName represents the cluster for which to take backup
|
||||
type: string
|
||||
remoteDeletePolicy:
|
||||
description: RemoteDeletePolicy the deletion policy that specify how to treat the data from remote storage. By default it's used softDelete.
|
||||
type: string
|
||||
required:
|
||||
- clusterName
|
||||
type: object
|
||||
status:
|
||||
description: MysqlBackupStatus defines the observed state of MysqlBackup
|
||||
properties:
|
||||
completed:
|
||||
description: Completed indicates whether the backup is in a final state, no matter whether its' corresponding job failed or succeeded
|
||||
type: boolean
|
||||
conditions:
|
||||
description: Conditions represents the backup resource conditions list.
|
||||
items:
|
||||
description: BackupCondition defines condition struct for backup resource
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: LastTransitionTime
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: Message
|
||||
type: string
|
||||
reason:
|
||||
description: Reason
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of (\"True\", \"False\", \"Unknown\")
|
||||
type: string
|
||||
type:
|
||||
description: type of cluster condition, values in (\"Ready\")
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
preserveUnknownFields: false
|
||||
4018
deploy/mysql-operator/crds/mysql.presslabs.org_mysqlclusters.yaml
Normal file
4018
deploy/mysql-operator/crds/mysql.presslabs.org_mysqlclusters.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,113 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.7.0
|
||||
name: mysqldatabases.mysql.presslabs.org
|
||||
labels:
|
||||
app.kubernetes.io/name: mysql-operator
|
||||
spec:
|
||||
group: mysql.presslabs.org
|
||||
names:
|
||||
kind: MysqlDatabase
|
||||
listKind: MysqlDatabaseList
|
||||
plural: mysqldatabases
|
||||
singular: mysqldatabase
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The database status
|
||||
jsonPath: .status.conditions[?(@.type == 'Ready')].status
|
||||
name: Ready
|
||||
type: string
|
||||
- jsonPath: .spec.clusterRef.name
|
||||
name: Cluster
|
||||
type: string
|
||||
- jsonPath: .spec.database
|
||||
name: Database
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: MysqlDatabase is the Schema for the MySQL database 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: MysqlDatabaseSpec defines the desired state of MysqlDatabaseSpec
|
||||
properties:
|
||||
characterSet:
|
||||
description: CharacterSet represents the charset name used when database is created
|
||||
type: string
|
||||
clusterRef:
|
||||
description: ClusterRef represents a reference to the MySQL cluster. This field should be immutable.
|
||||
properties:
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace the MySQL cluster namespace
|
||||
type: string
|
||||
type: object
|
||||
collation:
|
||||
description: Collation represents the collation name used as default database collation
|
||||
type: string
|
||||
database:
|
||||
description: Database represents the database name which will be created. This field should be immutable.
|
||||
type: string
|
||||
required:
|
||||
- clusterRef
|
||||
- database
|
||||
type: object
|
||||
status:
|
||||
description: MysqlDatabaseStatus defines the observed state of MysqlDatabase
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions represents the MysqlDatabase resource conditions list.
|
||||
items:
|
||||
description: MysqlDatabaseCondition defines the condition struct for a MysqlDatabase resource
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: The last time this condition was updated.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about the transition.
|
||||
type: string
|
||||
reason:
|
||||
description: The reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of MysqlDatabase condition.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
preserveUnknownFields: false
|
||||
167
deploy/mysql-operator/crds/mysql.presslabs.org_mysqlusers.yaml
Normal file
167
deploy/mysql-operator/crds/mysql.presslabs.org_mysqlusers.yaml
Normal file
@@ -0,0 +1,167 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.7.0
|
||||
name: mysqlusers.mysql.presslabs.org
|
||||
labels:
|
||||
app.kubernetes.io/name: mysql-operator
|
||||
spec:
|
||||
group: mysql.presslabs.org
|
||||
names:
|
||||
kind: MysqlUser
|
||||
listKind: MysqlUserList
|
||||
plural: mysqlusers
|
||||
singular: mysqluser
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- description: The user status
|
||||
jsonPath: .status.conditions[?(@.type == 'Ready')].status
|
||||
name: Ready
|
||||
type: string
|
||||
- jsonPath: .spec.clusterRef.name
|
||||
name: Cluster
|
||||
type: string
|
||||
- jsonPath: .spec.user
|
||||
name: UserName
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: MysqlUser is the Schema for the MySQL User 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: MysqlUserSpec defines the desired state of MysqlUserSpec
|
||||
properties:
|
||||
allowedHosts:
|
||||
description: AllowedHosts is the allowed host to connect from.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
clusterRef:
|
||||
description: ClusterRef represents a reference to the MySQL cluster. This field should be immutable.
|
||||
properties:
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
|
||||
type: string
|
||||
namespace:
|
||||
description: Namespace the MySQL cluster namespace
|
||||
type: string
|
||||
type: object
|
||||
password:
|
||||
description: Password is the password for the user.
|
||||
properties:
|
||||
key:
|
||||
description: The key of the secret to select from. Must be a valid secret key.
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?'
|
||||
type: string
|
||||
optional:
|
||||
description: Specify whether the Secret or its key must be defined
|
||||
type: boolean
|
||||
required:
|
||||
- key
|
||||
type: object
|
||||
permissions:
|
||||
description: Permissions is the list of roles that user has in the specified database.
|
||||
items:
|
||||
description: MysqlPermission defines a MySQL schema permission
|
||||
properties:
|
||||
permissions:
|
||||
description: Permissions represents the permissions granted on the schema/tables
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
schema:
|
||||
description: Schema represents the schema to which the permission applies
|
||||
type: string
|
||||
tables:
|
||||
description: Tables represents the tables inside the schema to which the permission applies
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
required:
|
||||
- permissions
|
||||
- schema
|
||||
- tables
|
||||
type: object
|
||||
type: array
|
||||
resourceLimits:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: 'ResourceLimits allow settings limit per mysql user as defined here: https://dev.mysql.com/doc/refman/5.7/en/user-resources.html'
|
||||
type: object
|
||||
user:
|
||||
description: User is the name of the user that will be created with will access the specified database. This field should be immutable.
|
||||
type: string
|
||||
required:
|
||||
- allowedHosts
|
||||
- clusterRef
|
||||
- password
|
||||
- user
|
||||
type: object
|
||||
status:
|
||||
description: MysqlUserStatus defines the observed state of MysqlUser
|
||||
properties:
|
||||
allowedHosts:
|
||||
description: AllowedHosts contains the list of hosts that the user is allowed to connect from.
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
conditions:
|
||||
description: Conditions represents the MysqlUser resource conditions list.
|
||||
items:
|
||||
description: MySQLUserCondition defines the condition struct for a MysqlUser resource
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: Last time the condition transitioned from one status to another.
|
||||
format: date-time
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: The last time this condition was updated.
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: A human readable message indicating details about the transition.
|
||||
type: string
|
||||
reason:
|
||||
description: The reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: Status of the condition, one of True, False, Unknown.
|
||||
type: string
|
||||
type:
|
||||
description: Type of MysqlUser condition.
|
||||
type: string
|
||||
required:
|
||||
- lastTransitionTime
|
||||
- message
|
||||
- reason
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
preserveUnknownFields: false
|
||||
Reference in New Issue
Block a user