| option app_label = "kubernetes"; |
| option name = "kubernetes"; |
| |
| message KubernetesService (Service){ |
| option verbose_name = "Kubernetes Service"; |
| |
| } |
| |
| message KubernetesResourceInstance (ServiceInstance){ |
| option verbose_name = "Kubernetes Resource Instance"; |
| option description = "An opaque-to-xos blob of yaml that is passed directly to kubectl"; |
| option sync_implemented = "True"; |
| |
| optional string resource_definition = 3 [ |
| help_text = "yaml containing kubernetes resources", |
| max_length = 65535]; |
| optional string kubectl_state = 4 [ |
| help_text = "Most recent kubectl action completed by synchronizer", |
| choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))", |
| feedback_state = True, |
| max_length = 32]; |
| } |
| |
| message KubernetesServiceInstance (ComputeServiceInstance){ |
| option verbose_name = "Kubernetes Service Instance"; |
| option description = "A ComputeServiceInstance in kubernetes, usually in the form of a pod"; |
| option sync_implemented = "True"; |
| |
| optional string pod_ip = 1 [ |
| help_text = "IP address of pod", |
| max_length=32]; |
| required bool need_event = 2 [ |
| help_text = "True if a kafka event needs to be sent by the pull step", |
| default = False]; |
| optional string last_event_sent = 3 [ |
| help_text = "Type of last event sent", |
| choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))", |
| max_length=32]; |
| } |
| |
| message KubernetesData (XOSBase) { |
| option description = "Base class for Kubernetes ConfigMaps, Secrets, and similar models"; |
| |
| required string name = 1 [ |
| help_text = "Name of this data store", |
| max_length=256]; |
| optional string data = 2 [ |
| help_text = "Set of key,value pairs encoded as a json dictionary", |
| text = True]; |
| required manytoone trust_domain->TrustDomain:kubernetes_configmaps = 3:1003 [ |
| help_text = "Trust domain this data resides in", |
| db_index = True]; |
| } |
| |
| message KubernetesConfigMap (KubernetesData) { |
| option description = "A Kubernetes ConfigMap, holding (name, value) data in insecure manner"; |
| option sync_implemented = "True"; |
| } |
| |
| message KubernetesSecret (KubernetesData) { |
| option description = "A kubernetes Secret, hodling (name, value) data in a secure manner"; |
| } |
| |
| message KubernetesSecretVolumeMount (XOSBase) { |
| option description = "Mounts a KubernetesSecret to a KubernetesServiceInstance"; |
| |
| required manytoone secret->KubernetesSecret:kubernetes_secret_volume_mounts = 1:1001 [ |
| help_text = "Secret to mount", |
| db_index = True]; |
| required manytoone service_instance->KubernetesServiceInstance:kubernetes_secret_volume_mounts = 2 [ |
| help_text = "Service instance in which to mount secret", |
| db_index = True]; |
| required string mount_path = 3 [ |
| help_text = "Path to mount secret", |
| max_length=1024]; |
| optional string sub_path = 4 [ |
| help_text = "Subpath within secret to mount", |
| max_length=1024]; |
| } |
| |
| message KubernetesConfigVolumeMount (XOSBase) { |
| option description = "Mounts a KubernetesConfigMap to a KubernetesServiceInstance"; |
| |
| required manytoone config->KubernetesConfigMap:kubernetes_config_voume_mounts = 1:1001 [ |
| help_text = "Config to mount", |
| db_index = True]; |
| required manytoone service_instance->KubernetesServiceInstance:kubernetes_config_volume_mounts = 2:1001 [ |
| help_text = "Service instance in which to mount config", |
| db_index = True]; |
| required string mount_path = 3 [ |
| help_text = "Path to mount secret", |
| max_length=1024]; |
| optional string sub_path = 4 [ |
| help_text = "Subpath within secret to mount", |
| max_length=1024]; |
| } |
| |