Scott Baker | 82b2b08 | 2018-04-16 16:02:14 -0700 | [diff] [blame] | 1 | option app_label = "kubernetes"; |
| 2 | option name = "kubernetes"; |
| 3 | |
| 4 | message KubernetesService (Service){ |
| 5 | option verbose_name = "Kubernetes Service"; |
| 6 | |
| 7 | } |
| 8 | |
Scott Baker | 1a2ee30 | 2018-08-27 16:16:19 -0700 | [diff] [blame^] | 9 | message KubernetesResourceInstance (XOSBase){ |
| 10 | option verbose_name = "Kubernetes Resource Instance"; |
| 11 | required string name = 1 [db_index = True, max_length = 200, content_type = "stripped", tosca_key=True, unique=True, help_text = "Name of ResourceInstance"]; |
| 12 | required manytoone owner->Service:kubernetes_resource_instances = 2 [db_index = True, null = False, blank = False]; |
| 13 | optional string resource_definition = 3 [help_text = "yaml blob"]; |
| 14 | optional string kubectl_state = 4 [max_length=32, db_index = False, choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))", help_text = "Most recent state of kubectl"]; |
| 15 | } |
| 16 | |
Scott Baker | 3fd18e5 | 2018-04-17 09:18:21 -0700 | [diff] [blame] | 17 | message KubernetesServiceInstance (ComputeServiceInstance){ |
Scott Baker | 82b2b08 | 2018-04-16 16:02:14 -0700 | [diff] [blame] | 18 | option verbose_name = "Kubernetes Service Instance"; |
Scott Baker | ac43a74 | 2018-05-07 16:54:03 -0700 | [diff] [blame] | 19 | optional string pod_ip = 1 [max_length=32, db_index = False, null = True, blank = True, help_text = "IP address of pod"]; |
Scott Baker | 987748d | 2018-08-09 16:14:11 -0700 | [diff] [blame] | 20 | required bool need_event = 2 [default = False, blank = True, help_text = "True if a kafka event needs to be sent by the pull step"]; |
| 21 | optional string last_event_sent = 3 [max_length=32, db_index = False, null = True, blank = True, choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))", help_text = "Type of last event sent"]; |
Scott Baker | 82b2b08 | 2018-04-16 16:02:14 -0700 | [diff] [blame] | 22 | } |
Scott Baker | ac43a74 | 2018-05-07 16:54:03 -0700 | [diff] [blame] | 23 | |
| 24 | message KubernetesData (XOSBase) { |
| 25 | optional string name = 1 [max_length=256, db_index = False, null = False, blank = False, help_text = "Name of this data store" ]; |
| 26 | optional string data = 2 [db_index = False, null = True, blank = True, help_text = "Set of key,value pairs encoded as a json dictionary"]; |
| 27 | required manytoone trust_domain->TrustDomain:kubernetes_configmaps = 3 [db_index = True, null = False, blank = False, help_text = "Trust domain this data resides in"]; |
| 28 | } |
| 29 | |
| 30 | message KubernetesConfigMap (KubernetesData) { |
| 31 | } |
| 32 | |
| 33 | message KubernetesSecret (KubernetesData) { |
| 34 | } |
| 35 | |
| 36 | message KubernetesSecretVolumeMount (XOSBase) { |
| 37 | required manytoone secret->KubernetesSecret:kubernetes_secret_volume_mounts = 1 [db_index = True, null = False, blank = False, help_text = "Secret to mount"]; |
| 38 | required manytoone service_instance->KubernetesServiceInstance:kubernetes_secret_volume_mounts = 2 [db_index = True, null = False, blank = False, help_text = "Service instance in which to mount secret"]; |
| 39 | optional string mount_path = 3 [max_length=256, db_index = False, null = False, blank = False, help_text = "Path to mount secret"]; |
| 40 | optional string sub_path = 4 [max_length=1024, db_index = False, null = True, blank = True, help_text = "Subpath within secret to mount"]; |
| 41 | } |
| 42 | |
| 43 | message KubernetesConfigVolumeMount (XOSBase) { |
| 44 | required manytoone config->KubernetesConfigMap:kubernetes_config_voume_mounts = 1 [db_index = True, null = False, blank = False, help_text = "Config to mount"]; |
| 45 | required manytoone service_instance->KubernetesServiceInstance:kubernetes_config_volume_mounts = 2 [db_index = True, null = False, blank = False, help_text = "Service instance in which to mount config"]; |
| 46 | optional string mount_path = 3 [max_length=1024, db_index = False, null = False, blank = False, help_text = "Path to mount secret"]; |
| 47 | optional string sub_path = 4 [max_length=1024, db_index = False, null = True, blank = True, help_text = "Subpath within secret to mount"]; |
| 48 | } |
| 49 | |