Skip to content

API resources

  • API resources are defined in api/<version>/xxx_types.go.
  • Manifest file for CustomResourceDefinition is generated by make manifests (controller-gen).
  • DeepCopy is generated by make generate (controller-gen).

MySQL

MySQL represents a MySQL cluster with root acess.

  • Spec
    • AdminUser
    • AdminPassword
  • Status
    • UserCount
    • DBCount

TODO:

MySQLUser

When MySQLUser is created/edited/deleted, MySQL user will be created/edited/deleted by the controller.

  • Spec
    • MysqlName: The name of MySQL object
    • Host: MySQL user's host
  • Status
    • Conditions
    • Phase: Ready if Secret and MySQL user are created, otherwise NotReady
    • Reason: Reason for NotReady

MySQLDB

You can create MySQL database with this custom resource.

  • Spec
    • DBName: The database name. (The reason for not directly using the object's name is becase some object name can't be used for database name)
    • MysqlName: The name of MySQL object

ToDo:

  • Validate DBName