blob: ea218e99f58bb8edde4b0ca543eaaa779ced9c71 [file] [log] [blame]
Scott Baker82b2b082018-04-16 16:02:14 -07001option app_label = "kubernetes";
2option name = "kubernetes";
3
4message KubernetesService (Service){
5 option verbose_name = "Kubernetes Service";
6
7}
8
Scott Baker4f5f1e22018-08-31 17:09:55 -07009message KubernetesResourceInstance (ServiceInstance){
Scott Baker1a2ee302018-08-27 16:16:19 -070010 option verbose_name = "Kubernetes Resource Instance";
Scott Bakerfdb10e12019-01-22 17:04:42 -080011 option description = "An opaque-to-xos blob of yaml that is passed directly to kubectl";
12
13 optional string resource_definition = 3 [
14 help_text = "yaml containing kubernetes resources",
15 max_length = 65535];
16 optional string kubectl_state = 4 [
17 help_text = "Most recent kubectl action completed by synchronizer",
18 choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))",
19 db_index = False,
20 feedback_state = True,
21 max_length = 32];
Scott Baker1a2ee302018-08-27 16:16:19 -070022}
23
Scott Baker3fd18e52018-04-17 09:18:21 -070024message KubernetesServiceInstance (ComputeServiceInstance){
Scott Baker82b2b082018-04-16 16:02:14 -070025 option verbose_name = "Kubernetes Service Instance";
Scott Bakerfdb10e12019-01-22 17:04:42 -080026 option description = "A ComputeServiceInstance in kubernetes, usually in the form of a pod";
27
28 optional string pod_ip = 1 [
29 help_text = "IP address of pod",
30 blank = True,
31 db_index = False,
32 max_length=32,
33 null = True];
34 required bool need_event = 2 [
Scott Bakerfdb10e12019-01-22 17:04:42 -080035 help_text = "True if a kafka event needs to be sent by the pull step",
36 default = False];
37 optional string last_event_sent = 3 [
38 help_text = "Type of last event sent",
39 blank = True,
40 choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))",
41 db_index = False,
42 max_length=32,
43 null = True];
Scott Baker82b2b082018-04-16 16:02:14 -070044}
Scott Bakerac43a742018-05-07 16:54:03 -070045
46message KubernetesData (XOSBase) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080047 option description = "Base class for Kubernetes ConfigMaps, Secrets, and similar models";
48
Scott Baker95c3dfb2019-03-07 11:24:11 -080049 required string name = 1 [
Scott Bakerfdb10e12019-01-22 17:04:42 -080050 help_text = "Name of this data store",
Scott Bakerfdb10e12019-01-22 17:04:42 -080051 db_index = False,
Scott Baker95c3dfb2019-03-07 11:24:11 -080052 max_length=256];
Scott Bakerfdb10e12019-01-22 17:04:42 -080053 optional string data = 2 [
54 help_text = "Set of key,value pairs encoded as a json dictionary",
Scott Baker95c3dfb2019-03-07 11:24:11 -080055 db_index = False];
Scott Bakerfdb10e12019-01-22 17:04:42 -080056 required manytoone trust_domain->TrustDomain:kubernetes_configmaps = 3:1003 [
57 help_text = "Trust domain this data resides in",
Scott Baker95c3dfb2019-03-07 11:24:11 -080058 db_index = True];
Scott Bakerac43a742018-05-07 16:54:03 -070059}
60
61message KubernetesConfigMap (KubernetesData) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080062 option description = "A Kubernetes ConfigMap, holding (name, value) data in insecure manner";
Scott Bakerac43a742018-05-07 16:54:03 -070063}
64
65message KubernetesSecret (KubernetesData) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080066 option description = "A kubernetes Secret, hodling (name, value) data in a secure manner";
Scott Bakerac43a742018-05-07 16:54:03 -070067}
68
69message KubernetesSecretVolumeMount (XOSBase) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080070 option description = "Mounts a KubernetesSecret to a KubernetesServiceInstance";
71
72 required manytoone secret->KubernetesSecret:kubernetes_secret_volume_mounts = 1:1001 [
73 help_text = "Secret to mount",
74 blank = False,
75 db_index = True,
76 null = False];
77 required manytoone service_instance->KubernetesServiceInstance:kubernetes_secret_volume_mounts = 2 [
78 help_text = "Service instance in which to mount secret",
79 blank = False,
80 db_index = True,
81 null = False];
Scott Baker95c3dfb2019-03-07 11:24:11 -080082 required string mount_path = 3 [
Scott Bakerfdb10e12019-01-22 17:04:42 -080083 help_text = "Path to mount secret",
Scott Bakerfdb10e12019-01-22 17:04:42 -080084 db_index = False,
Scott Baker95c3dfb2019-03-07 11:24:11 -080085 max_length=1024];
Scott Bakerfdb10e12019-01-22 17:04:42 -080086 optional string sub_path = 4 [
87 help_text = "Subpath within secret to mount",
Scott Bakerfdb10e12019-01-22 17:04:42 -080088 db_index = False,
Scott Baker95c3dfb2019-03-07 11:24:11 -080089 max_length=1024];
Scott Bakerac43a742018-05-07 16:54:03 -070090}
91
92message KubernetesConfigVolumeMount (XOSBase) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080093 option description = "Mounts a KubernetesConfigMap to a KubernetesServiceInstance";
94
95 required manytoone config->KubernetesConfigMap:kubernetes_config_voume_mounts = 1:1001 [
96 help_text = "Config to mount",
97 blank = False,
98 db_index = True,
99 null = False];
100 required manytoone service_instance->KubernetesServiceInstance:kubernetes_config_volume_mounts = 2:1001 [
101 help_text = "Service instance in which to mount config",
102 blank = False,
103 db_index = True,
104 null = False];
Scott Baker95c3dfb2019-03-07 11:24:11 -0800105 required string mount_path = 3 [
Scott Bakerfdb10e12019-01-22 17:04:42 -0800106 help_text = "Path to mount secret",
Scott Bakerfdb10e12019-01-22 17:04:42 -0800107 db_index = False,
Scott Baker95c3dfb2019-03-07 11:24:11 -0800108 max_length=1024];
Scott Bakerfdb10e12019-01-22 17:04:42 -0800109 optional string sub_path = 4 [
110 help_text = "Subpath within secret to mount",
Scott Bakerfdb10e12019-01-22 17:04:42 -0800111 db_index = False,
Scott Baker95c3dfb2019-03-07 11:24:11 -0800112 max_length=1024];
Scott Bakerac43a742018-05-07 16:54:03 -0700113}
114