clowder-common-ruby 0.2.2 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28b7e3334605263bb65b51caeee7801018273553660aa9079afa7dbcc9cc1334
4
- data.tar.gz: b750dacf95ee93a1e055a30df375eddf9cebcb53905c3b06eaeb098b0d094166
3
+ metadata.gz: dff7cc402aa2642333e32ab492fe4b017760ae4a9411b7e686f6a877f22fba01
4
+ data.tar.gz: 651e69a1d1fc83aa64b0b4f8ea7e6830dad4428efc48eaba2c674cdc7704d0f1
5
5
  SHA512:
6
- metadata.gz: d63024ea9077c527a4db8b658efb2badc03e5e3d7d1096dc8e609773112a246b08a0409c3fad8d808763911f51b8e2d2c82b25878fc6708bf831449907dd3f1a
7
- data.tar.gz: 3ddc4be800c46e72b19abf6c679c8b0ffc805bda918c3a6a678a97d17cb9ee7bdf3332f9ad09dbc0dc1c465221e6dd1ef4a800a8c2e829e1848c4a306a9086ba
6
+ metadata.gz: 102a5fb6bfe8cc8e8b8cc4d69eecf1300302b29f1e3f34e7397d1ffab0299efd9d5193f5577363ca620fc6d90a4a5d99a6a47a6b719757cd73c2b3bd69edd97c
7
+ data.tar.gz: 2f5a0f8f4f0aa92c9cc3a7dda8d96ded3e61a262cdedb5d518eaadc40ef589dcf9173dbf361db945dcb2224357183f68acfc7a266461955a03fb106a51424fb9
data/README.md CHANGED
@@ -18,14 +18,14 @@ require 'clowder-common-ruby'
18
18
 
19
19
  @config ||= {}.tap do |options|
20
20
  # uses ENV['ACG_CONFIG'] or you can provide the path as a method param
21
-
22
- if ClowderCommonRuby::Config.clowder_enabled?
23
- config = ClowderCommonRuby::Config.load
21
+
22
+ if ClowderCommonRuby::Config.clowder_enabled?
23
+ config = ClowderCommonRuby::Config.load
24
24
  options["webPorts"] = config.webPort
25
25
  options["databaseHostname"] = config.database.hostname
26
26
  options["kafkaTopics"] = config.kafka_topics
27
27
  # ...
28
- else
28
+ else
29
29
  options["webPorts"] = 3000
30
30
  options["databaseHostname"] = ENV['DATABASE_HOST']
31
31
  end
@@ -49,8 +49,8 @@ See [test.json](test.json) for all available values
49
49
 
50
50
  ### Kafka Topics
51
51
 
52
- Topics are structured as a hash `<requested_name> => <name>`
53
- where requested_name is equal to the key topicName in your ClowdApp Custom Resource Definition(CRD)'s yaml
52
+ Topics are structured as a hash `<requested_name> => <name>`
53
+ where `requested_name` is equal to the key topicName in your ClowdApp Custom Resource Definition(CRD)'s yaml
54
54
 
55
55
  If your kafka is deployed in `local` or `app-interface` mode (see [doc](https://clowder-operator.readthedocs.io/en/latest/providers/kafka.html))
56
56
  the `name` is equal to the `requested_name`.
@@ -58,6 +58,6 @@ the `name` is equal to the `requested_name`.
58
58
  Testing
59
59
  -------
60
60
 
61
- export `ACG_CONFIG="test.json"; ruby lib/clowder-common-ruby/test.rb
61
+ `ACG_CONFIG="test.json" ruby lib/clowder-common-ruby/test.rb`
62
62
 
63
- It inspects and prints the config file with loaded values or shows an error it the env. variable not configured correctly
63
+ It inspects and prints the config file with loaded values or shows an error it the env. variable not configured correctly
@@ -76,7 +76,7 @@ class RubyClassConverter
76
76
  init_function << " raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))\n"
77
77
  init_function << "\n"
78
78
  init_function << " attributes = attributes.each_with_object({}) do |(k, v), h|\n"
79
- init_function << " raise \"The input [\#{k}] is invalid\" unless valid_keys.include?(k.to_sym)\n"
79
+ init_function << " warn \"The input [\#{k}] is invalid\" unless valid_keys.include?(k.to_sym)\n"
80
80
  init_function << " h[k.to_sym] = v\n"
81
81
  init_function << " end\n"
82
82
  init_function << "\n"
data/bin/schema.json CHANGED
@@ -31,6 +31,9 @@
31
31
  "logging": {
32
32
  "$ref": "#/definitions/LoggingConfig"
33
33
  },
34
+ "metadata": {
35
+ "$ref": "#/definitions/AppMetadata"
36
+ },
34
37
  "kafka": {
35
38
  "$ref": "#/definitions/KafkaConfig"
36
39
  },
@@ -59,8 +62,11 @@
59
62
  "items": {
60
63
  "$ref": "#/definitions/PrivateDependencyEndpoint"
61
64
  }
65
+ },
66
+ "BOPURL": {
67
+ "description": "Defines the path to the BOPURL.",
68
+ "type": "string"
62
69
  }
63
-
64
70
  },
65
71
  "required": [
66
72
  "metricsPort",
@@ -85,6 +91,48 @@
85
91
  "type"
86
92
  ]
87
93
  },
94
+ "AppMetadata": {
95
+ "title": "AppMetadata",
96
+ "type": "object",
97
+ "description": "Arbitrary metadata pertaining to the application application",
98
+ "properties": {
99
+ "name": {
100
+ "description": "Name of the ClowdApp",
101
+ "type": "string"
102
+ },
103
+ "envName": {
104
+ "description": "Name of the ClowdEnvironment this ClowdApp runs in",
105
+ "type": "string"
106
+ },
107
+ "deployments": {
108
+ "description": "Metadata pertaining to an application's deployments",
109
+ "type": "array",
110
+ "items": {
111
+ "$ref": "#/definitions/DeploymentMetadata"
112
+ }
113
+ }
114
+ },
115
+ "required": []
116
+ },
117
+ "DeploymentMetadata": {
118
+ "title": "DeploymentMetadata",
119
+ "type": "object",
120
+ "description": "Deployment Metadata",
121
+ "properties": {
122
+ "name": {
123
+ "description": "Name of deployment",
124
+ "type": "string"
125
+ },
126
+ "image": {
127
+ "description": "Image used by deployment",
128
+ "type": "string"
129
+ }
130
+ },
131
+ "required": [
132
+ "name",
133
+ "image"
134
+ ]
135
+ },
88
136
  "CloudWatchConfig": {
89
137
  "title": "CloudWatchConfig",
90
138
  "type": "object",
@@ -139,6 +187,26 @@
139
187
  "topics"
140
188
  ]
141
189
  },
190
+ "KafkaSASLConfig":{
191
+ "id": "kafkaSASLConfig",
192
+ "type": "object",
193
+ "description": "SASL Configuration for Kafka",
194
+ "properties": {
195
+ "username": {
196
+ "type": "string"
197
+ },
198
+ "password": {
199
+ "type": "string"
200
+ },
201
+ "securityProtocol": {
202
+ "type": "string"
203
+ },
204
+ "saslMechanism": {
205
+ "type": "string"
206
+ }
207
+ },
208
+ "required": []
209
+ },
142
210
  "BrokerConfig": {
143
211
  "id": "brokerConfig",
144
212
  "type": "object",
@@ -149,6 +217,16 @@
149
217
  },
150
218
  "port": {
151
219
  "type": "integer"
220
+ },
221
+ "cacert": {
222
+ "type": "string"
223
+ },
224
+ "authtype": {
225
+ "type": "string",
226
+ "enum": ["mtls", "sasl"]
227
+ },
228
+ "sasl": {
229
+ "$ref": "#/definitions/KafkaSASLConfig"
152
230
  }
153
231
  },
154
232
  "required": [
@@ -167,10 +245,6 @@
167
245
  "name": {
168
246
  "description": "The name of the actual topic on the Kafka server.",
169
247
  "type": "string"
170
- },
171
- "consumerGroup": {
172
- "description": "Defines the consumer group that should be used for the topic.",
173
- "type": "string"
174
248
  }
175
249
  },
176
250
  "required": [
@@ -245,6 +319,10 @@
245
319
  "description": "Defines the secret key for the specified bucket.",
246
320
  "type": "string"
247
321
  },
322
+ "region": {
323
+ "description": "Defines the region for the specified bucket.",
324
+ "type": "string"
325
+ },
248
326
  "requestedName": {
249
327
  "description": "The name that was requested for the bucket in the ClowdApp.",
250
328
  "type": "string"
@@ -309,11 +387,21 @@
309
387
  "port": {
310
388
  "description": "Defines the port for the FeatureFlags server",
311
389
  "type": "integer"
390
+ },
391
+ "clientAccessToken": {
392
+ "description": "Defines the client access token to use when connect to the FeatureFlags server",
393
+ "type": "string"
394
+ },
395
+ "scheme": {
396
+ "description": "Details the scheme to use for FeatureFlags http/https",
397
+ "type": "string",
398
+ "enum": ["http", "https"]
312
399
  }
313
400
  },
314
401
  "required":[
315
402
  "hostname",
316
- "port"
403
+ "port",
404
+ "scheme"
317
405
  ]
318
406
  },
319
407
  "InMemoryDBConfig": {
@@ -4,6 +4,7 @@ require 'ostruct'
4
4
  module ClowderCommonRuby
5
5
  class AppConfig < OpenStruct
6
6
  attr_accessor :logging
7
+ attr_accessor :metadata
7
8
  attr_accessor :kafka
8
9
  attr_accessor :database
9
10
  attr_accessor :objectStore
@@ -17,11 +18,12 @@ module ClowderCommonRuby
17
18
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
18
19
 
19
20
  attributes = attributes.each_with_object({}) do |(k, v), h|
20
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
21
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
21
22
  h[k.to_sym] = v
22
23
  end
23
24
 
24
25
  @logging = LoggingConfig.new(attributes.fetch(:logging, {}))
26
+ @metadata = AppMetadata.new(attributes.fetch(:metadata, {}))
25
27
  @kafka = KafkaConfig.new(attributes.fetch(:kafka, {}))
26
28
  @database = DatabaseConfig.new(attributes.fetch(:database, {}))
27
29
  @objectStore = ObjectStoreConfig.new(attributes.fetch(:objectStore, {}))
@@ -45,6 +47,7 @@ module ClowderCommonRuby
45
47
  keys << :metricsPort
46
48
  keys << :metricsPath
47
49
  keys << :logging
50
+ keys << :metadata
48
51
  keys << :kafka
49
52
  keys << :database
50
53
  keys << :objectStore
@@ -52,6 +55,7 @@ module ClowderCommonRuby
52
55
  keys << :featureFlags
53
56
  keys << :endpoints
54
57
  keys << :privateEndpoints
58
+ keys << :BOPURL
55
59
  end
56
60
  end
57
61
  end
@@ -64,7 +68,7 @@ module ClowderCommonRuby
64
68
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
65
69
 
66
70
  attributes = attributes.each_with_object({}) do |(k, v), h|
67
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
71
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
68
72
  h[k.to_sym] = v
69
73
  end
70
74
 
@@ -79,6 +83,54 @@ module ClowderCommonRuby
79
83
  end
80
84
  end
81
85
 
86
+ class AppMetadata < OpenStruct
87
+ attr_accessor :deployments
88
+
89
+ def initialize(attributes)
90
+ super
91
+ raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
92
+
93
+ attributes = attributes.each_with_object({}) do |(k, v), h|
94
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
95
+ h[k.to_sym] = v
96
+ end
97
+
98
+ @deployments = []
99
+ attributes.fetch(:deployments, []).each do |attr|
100
+ @deployments << DeploymentMetadata.new(attr)
101
+ end
102
+ end
103
+
104
+ def valid_keys
105
+ [].tap do |keys|
106
+ keys << :name
107
+ keys << :envName
108
+ keys << :deployments
109
+ end
110
+ end
111
+ end
112
+
113
+ class DeploymentMetadata < OpenStruct
114
+
115
+ def initialize(attributes)
116
+ super
117
+ raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
118
+
119
+ attributes = attributes.each_with_object({}) do |(k, v), h|
120
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
121
+ h[k.to_sym] = v
122
+ end
123
+
124
+ end
125
+
126
+ def valid_keys
127
+ [].tap do |keys|
128
+ keys << :name
129
+ keys << :image
130
+ end
131
+ end
132
+ end
133
+
82
134
  class CloudWatchConfig < OpenStruct
83
135
 
84
136
  def initialize(attributes)
@@ -86,7 +138,7 @@ module ClowderCommonRuby
86
138
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
87
139
 
88
140
  attributes = attributes.each_with_object({}) do |(k, v), h|
89
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
141
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
90
142
  h[k.to_sym] = v
91
143
  end
92
144
 
@@ -111,7 +163,7 @@ module ClowderCommonRuby
111
163
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
112
164
 
113
165
  attributes = attributes.each_with_object({}) do |(k, v), h|
114
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
166
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
115
167
  h[k.to_sym] = v
116
168
  end
117
169
 
@@ -133,23 +185,51 @@ module ClowderCommonRuby
133
185
  end
134
186
  end
135
187
 
188
+ class KafkaSASLConfig < OpenStruct
189
+
190
+ def initialize(attributes)
191
+ super
192
+ raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
193
+
194
+ attributes = attributes.each_with_object({}) do |(k, v), h|
195
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
196
+ h[k.to_sym] = v
197
+ end
198
+
199
+ end
200
+
201
+ def valid_keys
202
+ [].tap do |keys|
203
+ keys << :username
204
+ keys << :password
205
+ keys << :securityProtocol
206
+ keys << :saslMechanism
207
+ end
208
+ end
209
+ end
210
+
136
211
  class BrokerConfig < OpenStruct
212
+ attr_accessor :sasl
137
213
 
138
214
  def initialize(attributes)
139
215
  super
140
216
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
141
217
 
142
218
  attributes = attributes.each_with_object({}) do |(k, v), h|
143
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
219
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
144
220
  h[k.to_sym] = v
145
221
  end
146
222
 
223
+ @sasl = KafkaSASLConfig.new(attributes.fetch(:sasl, {}))
147
224
  end
148
225
 
149
226
  def valid_keys
150
227
  [].tap do |keys|
151
228
  keys << :hostname
152
229
  keys << :port
230
+ keys << :cacert
231
+ keys << :authtype
232
+ keys << :sasl
153
233
  end
154
234
  end
155
235
  end
@@ -161,7 +241,7 @@ module ClowderCommonRuby
161
241
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
162
242
 
163
243
  attributes = attributes.each_with_object({}) do |(k, v), h|
164
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
244
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
165
245
  h[k.to_sym] = v
166
246
  end
167
247
 
@@ -171,7 +251,6 @@ module ClowderCommonRuby
171
251
  [].tap do |keys|
172
252
  keys << :requestedName
173
253
  keys << :name
174
- keys << :consumerGroup
175
254
  end
176
255
  end
177
256
  end
@@ -183,7 +262,7 @@ module ClowderCommonRuby
183
262
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
184
263
 
185
264
  attributes = attributes.each_with_object({}) do |(k, v), h|
186
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
265
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
187
266
  h[k.to_sym] = v
188
267
  end
189
268
 
@@ -211,7 +290,7 @@ module ClowderCommonRuby
211
290
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
212
291
 
213
292
  attributes = attributes.each_with_object({}) do |(k, v), h|
214
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
293
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
215
294
  h[k.to_sym] = v
216
295
  end
217
296
 
@@ -221,6 +300,7 @@ module ClowderCommonRuby
221
300
  [].tap do |keys|
222
301
  keys << :accessKey
223
302
  keys << :secretKey
303
+ keys << :region
224
304
  keys << :requestedName
225
305
  keys << :name
226
306
  end
@@ -235,7 +315,7 @@ module ClowderCommonRuby
235
315
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
236
316
 
237
317
  attributes = attributes.each_with_object({}) do |(k, v), h|
238
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
318
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
239
319
  h[k.to_sym] = v
240
320
  end
241
321
 
@@ -264,7 +344,7 @@ module ClowderCommonRuby
264
344
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
265
345
 
266
346
  attributes = attributes.each_with_object({}) do |(k, v), h|
267
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
347
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
268
348
  h[k.to_sym] = v
269
349
  end
270
350
 
@@ -274,6 +354,8 @@ module ClowderCommonRuby
274
354
  [].tap do |keys|
275
355
  keys << :hostname
276
356
  keys << :port
357
+ keys << :clientAccessToken
358
+ keys << :scheme
277
359
  end
278
360
  end
279
361
  end
@@ -285,7 +367,7 @@ module ClowderCommonRuby
285
367
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
286
368
 
287
369
  attributes = attributes.each_with_object({}) do |(k, v), h|
288
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
370
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
289
371
  h[k.to_sym] = v
290
372
  end
291
373
 
@@ -308,7 +390,7 @@ module ClowderCommonRuby
308
390
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
309
391
 
310
392
  attributes = attributes.each_with_object({}) do |(k, v), h|
311
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
393
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
312
394
  h[k.to_sym] = v
313
395
  end
314
396
 
@@ -331,7 +413,7 @@ module ClowderCommonRuby
331
413
  raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
332
414
 
333
415
  attributes = attributes.each_with_object({}) do |(k, v), h|
334
- raise "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
416
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
335
417
  h[k.to_sym] = v
336
418
  end
337
419
 
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.2.2'.freeze
2
+ VERSION = '0.2.5'.freeze
3
3
  end
data/test.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "webPort": 8000,
2
+ "publicPort": 8000,
3
3
  "metricsPort": 9000,
4
4
  "metricsPath": "/metrics",
5
5
  "logging": {
@@ -15,14 +15,14 @@
15
15
  "brokers": [
16
16
  {
17
17
  "hostname": "broker-host",
18
- "port": 27015
18
+ "port": 27015,
19
+ "cacert": "kafkaca"
19
20
  }
20
21
  ],
21
22
  "topics": [
22
23
  {
23
24
  "requestedName": "originalName",
24
- "name": "someTopic",
25
- "consumerGroup": "someGroupName"
25
+ "name": "someTopic"
26
26
  }
27
27
  ]
28
28
  },
@@ -32,9 +32,11 @@
32
32
  "password": "password",
33
33
  "hostname": "hostname",
34
34
  "port": 5432,
35
+ "pgPass": "testing",
35
36
  "adminUsername": "adminusername",
36
37
  "adminPassword": "adminpassword",
37
- "rdsCa": "ca"
38
+ "rdsCa": "ca",
39
+ "sslMode": "verify-full"
38
40
  },
39
41
  "objectStore": {
40
42
  "hostname": "endpoint",
@@ -53,7 +55,8 @@
53
55
  },
54
56
  "featureFlags": {
55
57
  "hostname": "ff-server.server.example.com",
56
- "port": 4242
58
+ "port": 4242,
59
+ "scheme": "http"
57
60
  },
58
61
  "endpoints": [
59
62
  {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clowder-common-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Red Hat Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-12 00:00:00.000000000 Z
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This is a ruby interface for preparing Clowder variables.
14
14
  email:
@@ -24,7 +24,6 @@ files:
24
24
  - bin/schema.json
25
25
  - lib/clowder-common-ruby.rb
26
26
  - lib/clowder-common-ruby/config.rb
27
- - lib/clowder-common-ruby/schema.json
28
27
  - lib/clowder-common-ruby/test.rb
29
28
  - lib/clowder-common-ruby/types.rb
30
29
  - lib/clowder-common-ruby/version.rb
@@ -49,8 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
49
48
  - !ruby/object:Gem::Version
50
49
  version: '0'
51
50
  requirements: []
52
- rubyforge_project:
53
- rubygems_version: 2.7.6.2
51
+ rubygems_version: 3.3.7
54
52
  signing_key:
55
53
  specification_version: 4
56
54
  summary: Supporting files and libraries for Clowder environmental variables.
@@ -1,401 +0,0 @@
1
- {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$ref": "#/definitions/AppConfig",
4
- "$id": "https://cloud.redhat.com/schemas/clowder-appconfig",
5
- "title": "AppConfig",
6
- "definitions": {
7
- "AppConfig": {
8
- "type": "object",
9
- "description": "ClowdApp deployment configuration for Clowder enabled apps.",
10
- "properties": {
11
- "privatePort": {
12
- "description": "Defines the private port that the app should be configured to listen on for API traffic.",
13
- "type": "integer"
14
- },
15
- "publicPort": {
16
- "description": "Defines the public port that the app should be configured to listen on for API traffic.",
17
- "type": "integer"
18
- },
19
- "webPort": {
20
- "description": "Deprecated: Use 'publicPort' instead.",
21
- "type": "integer"
22
- },
23
- "metricsPort": {
24
- "description": "Defines the metrics port that the app should be configured to listen on for metric traffic.",
25
- "type": "integer"
26
- },
27
- "metricsPath": {
28
- "description": "Defines the path to the metrics server that the app should be configured to listen on for metric traffic.",
29
- "type": "string"
30
- },
31
- "logging": {
32
- "$ref": "#/definitions/LoggingConfig"
33
- },
34
- "kafka": {
35
- "$ref": "#/definitions/KafkaConfig"
36
- },
37
- "database": {
38
- "$ref": "#/definitions/DatabaseConfig"
39
- },
40
- "objectStore": {
41
- "$ref": "#/definitions/ObjectStoreConfig"
42
- },
43
- "inMemoryDb": {
44
- "$ref": "#/definitions/InMemoryDBConfig"
45
- },
46
- "featureFlags": {
47
- "$ref": "#/definitions/FeatureFlagsConfig"
48
- },
49
- "endpoints": {
50
- "id": "endpoints",
51
- "type": "array",
52
- "items": {
53
- "$ref": "#/definitions/DependencyEndpoint"
54
- }
55
- },
56
- "privateEndpoints": {
57
- "id": "privateEndpoints",
58
- "type": "array",
59
- "items": {
60
- "$ref": "#/definitions/PrivateDependencyEndpoint"
61
- }
62
- }
63
-
64
- },
65
- "required": [
66
- "metricsPort",
67
- "metricsPath",
68
- "logging"
69
- ]
70
- },
71
- "LoggingConfig": {
72
- "title": "LoggingConfig",
73
- "type": "object",
74
- "description": "Logging Configuration",
75
- "properties": {
76
- "type": {
77
- "description": "Defines the type of logging configuration",
78
- "type": "string"
79
- },
80
- "cloudwatch": {
81
- "$ref": "#/definitions/CloudWatchConfig"
82
- }
83
- },
84
- "required": [
85
- "type"
86
- ]
87
- },
88
- "CloudWatchConfig": {
89
- "title": "CloudWatchConfig",
90
- "type": "object",
91
- "description": "Cloud Watch configuration",
92
- "properties": {
93
- "accessKeyId": {
94
- "description": "Defines the access key that the app should use for configuring CloudWatch.",
95
- "type": "string"
96
- },
97
- "secretAccessKey": {
98
- "description": "Defines the secret key that the app should use for configuring CloudWatch.",
99
- "type": "string"
100
- },
101
- "region": {
102
- "description": "Defines the region that the app should use for configuring CloudWatch.",
103
- "type": "string"
104
- },
105
- "logGroup": {
106
- "description": "Defines the logGroup that the app should use for configuring CloudWatch.",
107
- "type": "string"
108
- }
109
- },
110
- "required": [
111
- "accessKeyId",
112
- "secretAccessKey",
113
- "region",
114
- "logGroup"
115
- ]
116
- },
117
- "KafkaConfig": {
118
- "id": "kafkaConfig",
119
- "type": "object",
120
- "description": "Kafka Configuration",
121
- "properties": {
122
- "brokers": {
123
- "description": "Defines the brokers the app should connect to for Kafka services.",
124
- "type": "array",
125
- "items": {
126
- "$ref": "#/definitions/BrokerConfig"
127
- }
128
- },
129
- "topics": {
130
- "type": "array",
131
- "description": "Defines a list of the topic configurations available to the application.",
132
- "items": {
133
- "$ref": "#/definitions/TopicConfig"
134
- }
135
- }
136
- },
137
- "required": [
138
- "brokers",
139
- "topics"
140
- ]
141
- },
142
- "BrokerConfig": {
143
- "id": "brokerConfig",
144
- "type": "object",
145
- "description": "Broker Configuration",
146
- "properties": {
147
- "hostname": {
148
- "type": "string"
149
- },
150
- "port": {
151
- "type": "integer"
152
- }
153
- },
154
- "required": [
155
- "hostname"
156
- ]
157
- },
158
- "TopicConfig": {
159
- "id": "topicConfig",
160
- "type": "object",
161
- "description": "Topic Configuration",
162
- "properties": {
163
- "requestedName": {
164
- "description": "The name that the app requested in the ClowdApp definition.",
165
- "type": "string"
166
- },
167
- "name": {
168
- "description": "The name of the actual topic on the Kafka server.",
169
- "type": "string"
170
- },
171
- "consumerGroup": {
172
- "description": "Defines the consumer group that should be used for the topic.",
173
- "type": "string"
174
- }
175
- },
176
- "required": [
177
- "name",
178
- "requestedName"
179
- ]
180
- },
181
- "DatabaseConfig": {
182
- "id": "database",
183
- "title": "DatabaseConfig",
184
- "type": "object",
185
- "description": "Database Configuration",
186
- "properties": {
187
- "name": {
188
- "description": "Defines the database name.",
189
- "type": "string"
190
- },
191
- "username": {
192
- "description": "Defines a username with standard access to the database.",
193
- "type": "string"
194
- },
195
- "password": {
196
- "description": "Defines the password for the standard user.",
197
- "type": "string"
198
- },
199
- "hostname": {
200
- "description": "Defines the hostname of the database configured for the ClowdApp.",
201
- "type": "string"
202
- },
203
- "port": {
204
- "description": "Defines the port of the database configured for the ClowdApp.",
205
- "type": "integer"
206
- },
207
- "adminUsername": {
208
- "description": "Defines the pgAdmin username.",
209
- "type": "string"
210
- },
211
- "adminPassword": {
212
- "description": "Defines the pgAdmin password.",
213
- "type": "string"
214
- },
215
- "rdsCa": {
216
- "description": "Defines the CA used to access the database.",
217
- "type": "string"
218
- }
219
- },
220
- "required": [
221
- "name",
222
- "username",
223
- "password",
224
- "hostname",
225
- "port",
226
- "adminUsername",
227
- "adminPassword"
228
- ]
229
- },
230
- "ObjectStoreBucket": {
231
- "id": "objectStoreBucket",
232
- "type": "object",
233
- "description": "Object Storage Bucket",
234
- "properties": {
235
- "accessKey": {
236
- "description": "Defines the access key for specificed bucket.",
237
- "type": "string"
238
- },
239
- "secretKey": {
240
- "description": "Defines the secret key for the specified bucket.",
241
- "type": "string"
242
- },
243
- "requestedName": {
244
- "description": "The name that was requested for the bucket in the ClowdApp.",
245
- "type": "string"
246
- },
247
- "name": {
248
- "description": "The actual name of the bucket being accessed.",
249
- "type": "string"
250
- }
251
- },
252
- "required": [
253
- "name",
254
- "requestedName"
255
- ]
256
- },
257
- "ObjectStoreConfig": {
258
- "id": "objectStoreConfig",
259
- "type": "object",
260
- "description": "Object Storage Configuration",
261
- "properties": {
262
- "buckets": {
263
- "type": "array",
264
- "items": {
265
- "$ref": "#/definitions/ObjectStoreBucket"
266
- }
267
- },
268
- "accessKey": {
269
- "description": "Defines the access key for the Object Storage server configuration.",
270
- "type": "string"
271
- },
272
- "secretKey": {
273
- "description": "Defines the secret key for the Object Storage server configuration.",
274
- "type": "string"
275
- },
276
- "hostname": {
277
- "description": "Defines the hostname for the Object Storage server configuration.",
278
- "type": "string"
279
- },
280
- "port": {
281
- "description": "Defines the port for the Object Storage server configuration.",
282
- "type": "integer"
283
- },
284
- "tls": {
285
- "description": "Details if the Object Server uses TLS.",
286
- "type": "boolean"
287
- }
288
- },
289
- "required": [
290
- "hostname",
291
- "port",
292
- "tls"
293
- ]
294
- },
295
- "FeatureFlagsConfig": {
296
- "id": "featureFlagsConfig",
297
- "type": "object",
298
- "description": "Feature Flags Configuration",
299
- "properties": {
300
- "hostname": {
301
- "description": "Defines the hostname for the FeatureFlags server",
302
- "type": "string"
303
- },
304
- "port": {
305
- "description": "Defines the port for the FeatureFlags server",
306
- "type": "integer"
307
- }
308
- },
309
- "required":[
310
- "hostname",
311
- "port"
312
- ]
313
- },
314
- "InMemoryDBConfig": {
315
- "id": "inMemoryDbConfig",
316
- "type": "object",
317
- "description": "In Memory DB Configuration",
318
- "properties": {
319
- "hostname": {
320
- "description": "Defines the hostname for the In Memory DB server configuration.",
321
- "type": "string"
322
- },
323
- "port": {
324
- "description": "Defines the port for the In Memory DB server configuration.",
325
- "type": "integer"
326
- },
327
- "username": {
328
- "description": "Defines the username for the In Memory DB server configuration.",
329
- "type": "string"
330
- },
331
- "password": {
332
- "description": "Defines the password for the In Memory DB server configuration.",
333
- "type": "string"
334
- }
335
- },
336
- "required": [
337
- "hostname",
338
- "port"
339
-
340
- ]
341
- },
342
- "DependencyEndpoint": {
343
- "id": "dependency",
344
- "type": "object",
345
- "description": "Dependent service connection info",
346
- "properties": {
347
- "name": {
348
- "description": "The PodSpec name of the dependent service inside the ClowdApp.",
349
- "type": "string"
350
- },
351
- "hostname": {
352
- "description": "The hostname of the dependent service.",
353
- "type": "string"
354
- },
355
- "port": {
356
- "description": "The port of the dependent service.",
357
- "type": "integer"
358
- },
359
- "app": {
360
- "description": "The app name of the ClowdApp hosting the service.",
361
- "type": "string"
362
- }
363
- },
364
- "required": [
365
- "name",
366
- "hostname",
367
- "port",
368
- "app"
369
- ]
370
- },
371
- "PrivateDependencyEndpoint": {
372
- "id": "privateDependency",
373
- "type": "object",
374
- "description": "Dependent service connection info",
375
- "properties": {
376
- "name": {
377
- "description": "The PodSpec name of the dependent service inside the ClowdApp.",
378
- "type": "string"
379
- },
380
- "hostname": {
381
- "description": "The hostname of the dependent service.",
382
- "type": "string"
383
- },
384
- "port": {
385
- "description": "The port of the dependent service.",
386
- "type": "integer"
387
- },
388
- "app": {
389
- "description": "The app name of the ClowdApp hosting the service.",
390
- "type": "string"
391
- }
392
- },
393
- "required": [
394
- "name",
395
- "hostname",
396
- "port",
397
- "app"
398
- ]
399
- }
400
- }
401
- }