blob: e3f85d37444cd1fceabf26f566044ab7db741437 [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 [
35 blank = True,
36 help_text = "True if a kafka event needs to be sent by the pull step",
37 default = False];
38 optional string last_event_sent = 3 [
39 help_text = "Type of last event sent",
40 blank = True,
41 choices = "(('created', 'CREATED'), ('updated', 'UPDATED'), ('deleted', 'DELETED'))",
42 db_index = False,
43 max_length=32,
44 null = True];
Scott Baker82b2b082018-04-16 16:02:14 -070045}
Scott Bakerac43a742018-05-07 16:54:03 -070046
47message KubernetesData (XOSBase) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080048 option description = "Base class for Kubernetes ConfigMaps, Secrets, and similar models";
49
50 optional string name = 1 [
51 help_text = "Name of this data store",
52 blank = False,
53 db_index = False,
54 max_length=256,
55 null = False];
56 optional string data = 2 [
57 help_text = "Set of key,value pairs encoded as a json dictionary",
58 blank = True,
59 db_index = False,
60 null = True];
61 required manytoone trust_domain->TrustDomain:kubernetes_configmaps = 3:1003 [
62 help_text = "Trust domain this data resides in",
63 blank = False,
64 db_index = True,
65 null = False];
Scott Bakerac43a742018-05-07 16:54:03 -070066}
67
68message KubernetesConfigMap (KubernetesData) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080069 option description = "A Kubernetes ConfigMap, holding (name, value) data in insecure manner";
Scott Bakerac43a742018-05-07 16:54:03 -070070}
71
72message KubernetesSecret (KubernetesData) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080073 option description = "A kubernetes Secret, hodling (name, value) data in a secure manner";
Scott Bakerac43a742018-05-07 16:54:03 -070074}
75
76message KubernetesSecretVolumeMount (XOSBase) {
Scott Bakerfdb10e12019-01-22 17:04:42 -080077 option description = "Mounts a KubernetesSecret to a KubernetesServiceInstance";
78
79 required manytoone secret->KubernetesSecret:kubernetes_secret_volume_mounts = 1:1001 [
80 help_text = "Secret to mount",
81 blank = False,
82 db_index = True,
83 null = False];
84 required manytoone service_instance->KubernetesServiceInstance:kubernetes_secret_volume_mounts = 2 [
85 help_text = "Service instance in which to mount secret",
86 blank = False,
87 db_index = True,
88 null = False];
89 optional string mount_path = 3 [
90 help_text = "Path to mount secret",
91 blank = False,
92 db_index = False,
93 max_length=256,
94 null = False];
95 optional string sub_path = 4 [
96 help_text = "Subpath within secret to mount",
97 blank = True,
98 db_index = False,
99 max_length=1024,
100 null = True];
Scott Bakerac43a742018-05-07 16:54:03 -0700101}
102
103message KubernetesConfigVolumeMount (XOSBase) {
Scott Bakerfdb10e12019-01-22 17:04:42 -0800104 option description = "Mounts a KubernetesConfigMap to a KubernetesServiceInstance";
105
106 required manytoone config->KubernetesConfigMap:kubernetes_config_voume_mounts = 1:1001 [
107 help_text = "Config to mount",
108 blank = False,
109 db_index = True,
110 null = False];
111 required manytoone service_instance->KubernetesServiceInstance:kubernetes_config_volume_mounts = 2:1001 [
112 help_text = "Service instance in which to mount config",
113 blank = False,
114 db_index = True,
115 null = False];
116 optional string mount_path = 3 [
117 help_text = "Path to mount secret",
118 blank = False,
119 db_index = False,
120 max_length=1024,
121 null = False];
122 optional string sub_path = 4 [
123 help_text = "Subpath within secret to mount",
124 blank = True,
125 db_index = False,
126 max_length=1024,
127 null = True];
Scott Bakerac43a742018-05-07 16:54:03 -0700128}
129