clowder-common-ruby 0.5.6 → 0.5.7

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: 2a0183d53d4a43907739edb12a4563ada87e5b1264280c1eb6bfd9ac3d1f6d63
4
- data.tar.gz: 611254dedf957e0742eb6ae96015db798358c588fabe2b83de047aaeac79a2eb
3
+ metadata.gz: 721b0528d52ef01fc735043e255337628b98196ed3c8f216c6436f9c34ad3c55
4
+ data.tar.gz: 4db1236e8ac887664834d7048d69f927896dd69da5f7a221cdaa09dc41782cb1
5
5
  SHA512:
6
- metadata.gz: 14b05ed1a3bc92792a2caa004d1d0be3935134778ce15e6865f8e7d099d9df16f7834dac9ced6def83d04576fccb78bc0aa53d434750608ea44d119bebb0338f
7
- data.tar.gz: 3c6ef3e9b0302902f89b126e83df570c28a878d55d094e4b87ce11e3037c157258400f0cb3b6f03407099c685aff362c7ba59f56f49b07228d022300423cb920
6
+ metadata.gz: ae4425e74de30e9935ec3e52f7669658535b9ea9b2b14284cf18a8c19f331a1b88ea28959b41b7ea1097a45503c5c2941f179000f24e0fb6ea5cb02d2c5254b6
7
+ data.tar.gz: ab698201f0268a255e6337cbf51c3a7a2f67121837137a998806b9d5ef00dc11084c855802bc5e5feec6505df523ec73d20c9ee0c67acf213ab8a32867b2106f
data/README.md CHANGED
@@ -1,19 +1,38 @@
1
- clowder-common-ruby
2
- =================
1
+ # clowder-common-ruby
3
2
 
4
- Simple client access library for the config for the Clowder operator.
3
+ Ruby client library for reading [Clowder][clowder] operator configuration. Parses the JSON config
4
+ file written by Clowder into typed Ruby objects with convenience accessors for Kafka, database,
5
+ object storage, and other subsystems.
5
6
 
6
- Based on schema.json, the corresponding Ruby Classes are generated in types.rb.
7
+ Based on `schema.json`, the corresponding Ruby classes are auto-generated in `types.rb`.
7
8
 
8
- Usage
9
- -----
9
+ ## Installation
10
10
 
11
- The `clowder` library provides basic values like expected public port, metrics port,
12
- database credentials etc.
11
+ Add the gem to your application's Gemfile:
13
12
 
14
- Usage:
13
+ ```ruby
14
+ gem "clowder-common-ruby"
15
+ ```
16
+
17
+ Then run:
18
+
19
+ ```sh
20
+ bundle install
21
+ ```
22
+
23
+ Or install directly:
15
24
 
25
+ ```sh
26
+ gem install clowder-common-ruby
16
27
  ```
28
+
29
+ ## Usage
30
+
31
+ The Clowder operator sets the `ACG_CONFIG` environment variable to the path of a JSON configuration
32
+ file on the pod filesystem. This library reads that file and exposes typed accessors for each
33
+ subsystem.
34
+
35
+ ```ruby
17
36
  require 'clowder-common-ruby'
18
37
 
19
38
  @config ||= {}.tap do |options|
@@ -21,7 +40,7 @@ require 'clowder-common-ruby'
21
40
 
22
41
  if ClowderCommonRuby::Config.clowder_enabled?
23
42
  config = ClowderCommonRuby::Config.load
24
- options["publicPort"] = config.publicPort
43
+ options["publicPort"] = config.publicPort
25
44
  options["databaseHostname"] = config.database.hostname
26
45
  options["kafkaTopics"] = config.kafka_topics
27
46
  # ...
@@ -32,36 +51,95 @@ require 'clowder-common-ruby'
32
51
  end
33
52
  ```
34
53
 
35
- The ``clowder`` library also comes with several other helpers
54
+ ### Convenience Accessors
36
55
 
37
- * ``config.kafka_topics`` - returns a map of KafkaTopics using the requestedName
38
- as the key and the topic object as the value.
39
- * ``config.kafka_servers`` - returns a list of Kafka Broker URLs.
40
- * ``config.object_buckets`` - returns a list of ObjectBuckets using the requestedName
41
- as the key and the bucket object as the value.
42
- * ``config.dependency_endpoints`` - returns a nested map using \[appName\]\[deploymentName\]
43
- for the public services of requested applications.
44
- * ``config.private_dependency_endpoints`` - returns a nested map using \[appName\]\[deploymentName\]
45
- for the private services of requested applications.
56
+ | Method | Returns |
57
+ |---|---|
58
+ | `config.kafka_topics` | Hash of `{ requestedName => TopicConfig }` |
59
+ | `config.kafka_servers` | Array of Kafka broker URLs |
60
+ | `config.object_buckets` | Hash of `{ requestedName => ObjectStoreBucket }` |
61
+ | `config.dependency_endpoints` | Nested hash `{ appName => { deploymentName => DependencyEndpoint } }` for public services |
62
+ | `config.private_dependency_endpoints` | Nested hash `{ appName => { deploymentName => PrivateDependencyEndpoint } }` for private services |
46
63
 
64
+ See [test.json][test-json] for all available configuration values.
47
65
 
48
- See [test.json](test.json) for all available values
66
+ ### Usage in Rails
49
67
 
50
- ### Usage in Rails
68
+ In Rails applications, require the engine to auto-load configuration into `Settings`:
51
69
 
52
- In Rails applications, requiring the ```clowder-common-ruby/engine``` will run the initializer, the output of which will be accessible under ```Settings```.
70
+ ```ruby
71
+ require 'clowder-common-ruby/engine'
72
+ ```
73
+
74
+ The initializer runs at boot, converts the Clowder config into a Rails-friendly hash, and injects
75
+ it via `Settings.add_source!`. This requires the [config][config-gem] gem (`Settings` object) to be
76
+ available in the host application.
53
77
 
54
78
  ### Kafka Topics
55
79
 
56
- Topics are structured as a hash `<requested_name> => <name>`
57
- where `requested_name` is equal to the key topicName in your ClowdApp Custom Resource Definition(CRD)'s yaml
80
+ Topics are structured as a hash `<requested_name> => <name>` where `requested_name` is equal to
81
+ the `topicName` key in your ClowdApp Custom Resource Definition (CRD) YAML.
82
+
83
+ If your Kafka is deployed in `local` or `app-interface` mode (see
84
+ [Clowder Kafka provider documentation][kafka-docs]), the `name` is equal to the `requested_name`.
85
+
86
+ ## Development Setup
87
+
88
+ ### Prerequisites
89
+
90
+ - Ruby (version pinned in `.ruby-version`, currently 3.4.9)
91
+ - Bundler
92
+
93
+ ### Getting started
94
+
95
+ ```sh
96
+ git clone https://github.com/RedHatInsights/clowder-common-ruby.git
97
+ cd clowder-common-ruby
98
+ bundle install
99
+ ```
100
+
101
+ ### Running tests
102
+
103
+ ```sh
104
+ ACG_CONFIG="test.json" bundle exec rake spec
105
+ ```
106
+
107
+ Or equivalently (since `spec` is the default Rake task):
108
+
109
+ ```sh
110
+ ACG_CONFIG="test.json" bundle exec rake
111
+ ```
112
+
113
+ ### Manual smoke test
114
+
115
+ ```sh
116
+ ACG_CONFIG="test.json" ruby lib/clowder-common-ruby/test.rb
117
+ ```
118
+
119
+ This loads and prints the config file with parsed values.
120
+
121
+ ### Regenerating types from upstream schema
122
+
123
+ To sync with the latest Clowder JSON Schema and regenerate `types.rb`:
124
+
125
+ ```sh
126
+ ./sync_config.sh
127
+ ```
128
+
129
+ This downloads the schema from the [Clowder repository][clowder] and runs the code generator.
130
+
131
+ ## Architecture
58
132
 
59
- If your kafka is deployed in `local` or `app-interface` mode (see [doc](https://clowder-operator.readthedocs.io/en/latest/providers/kafka.html))
60
- the `name` is equal to the `requested_name`.
133
+ For internal design decisions, the code generation pipeline, and dependency points, see
134
+ [ARCHITECTURE.md][architecture].
61
135
 
62
- Testing
63
- -------
136
+ ## License
64
137
 
65
- `ACG_CONFIG="test.json" ruby lib/clowder-common-ruby/test.rb`
138
+ This project is licensed under the [Apache License 2.0][license].
66
139
 
67
- It inspects and prints the config file with loaded values or shows an error it the env. variable not configured correctly
140
+ [clowder]: https://github.com/RedHatInsights/clowder
141
+ [test-json]: ./test.json
142
+ [config-gem]: https://github.com/rubyconfig/config
143
+ [kafka-docs]: https://clowder-operator.readthedocs.io/en/latest/providers/kafka.html
144
+ [architecture]: ./ARCHITECTURE.md
145
+ [license]: ./LICENSE.txt
data/bin/bump_version CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- text = File.read('../lib/clowder-common-ruby/version.rb')
3
+ text = File.read('./lib/clowder-common-ruby/version.rb')
4
4
 
5
5
  patch = text.sub(/^.*'\d+\.\d+\.(\d+)'.*$/m, '\1').to_i
6
6
 
7
- File.open('../lib/clowder-common-ruby/version.rb', 'w') do |f|
7
+ File.open('./lib/clowder-common-ruby/version.rb', 'w') do |f|
8
8
  f.write text.sub(/^(.*'\d+\.\d+\.)\d+('.*)$/m, "\\1#{patch + 1}\\2")
9
9
  end
data/bin/schema.json CHANGED
@@ -16,12 +16,20 @@
16
16
  "description": "Defines the public port that the app should be configured to listen on for API traffic.",
17
17
  "type": "integer"
18
18
  },
19
+ "h2cPrivatePort": {
20
+ "description": "Defines the private H2C port that the app should be configured to listen on for H2C traffic.",
21
+ "type": "integer"
22
+ },
23
+ "h2cPublicPort": {
24
+ "description": "Defines the public H2C port that the app should be configured to listen on for H2C traffic.",
25
+ "type": "integer"
26
+ },
19
27
  "webPort": {
20
28
  "description": "Deprecated: Use 'publicPort' instead.",
21
29
  "type": "integer"
22
30
  },
23
31
  "tlsCAPath": {
24
- "description": "Defines the port CA path",
32
+ "description": "Defines path to default CA certificate for TLS connections to other ClowdApps. Only populated when TLS is enabled for entire ClowdEnvironment.",
25
33
  "type": "string"
26
34
  },
27
35
  "metricsPort": {
@@ -81,6 +89,50 @@
81
89
  },
82
90
  "prometheusGateway": {
83
91
  "$ref": "#/definitions/PrometheusGatewayConfig"
92
+ },
93
+ "dependencyEndpoints": {
94
+ "id": "dependencyEndpoints",
95
+ "type": "object",
96
+ "description": "V2 public dependency endpoints with simplified URI-based structure",
97
+ "properties": {
98
+ "v2": {
99
+ "type": "object",
100
+ "description": "Version 2 public dependency endpoint format with URI-based endpoints",
101
+ "patternProperties": {
102
+ ".*": {
103
+ "type": "object",
104
+ "description": "App-level endpoint grouping",
105
+ "patternProperties": {
106
+ ".*": {
107
+ "$ref": "#/definitions/DependencyEndpointV2"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ }
113
+ }
114
+ },
115
+ "privateDependencyEndpoints": {
116
+ "id": "privateDependencyEndpoints",
117
+ "type": "object",
118
+ "description": "V2 private dependency endpoints with simplified URI-based structure",
119
+ "properties": {
120
+ "v2": {
121
+ "type": "object",
122
+ "description": "Version 2 private dependency endpoint format with URI-based endpoints",
123
+ "patternProperties": {
124
+ ".*": {
125
+ "type": "object",
126
+ "description": "App-level endpoint grouping",
127
+ "patternProperties": {
128
+ ".*": {
129
+ "$ref": "#/definitions/DependencyEndpointV2"
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
84
136
  }
85
137
  },
86
138
  "required": [
@@ -495,6 +547,18 @@
495
547
  "description": "The TLS port of the dependent service.",
496
548
  "type": "integer"
497
549
  },
550
+ "h2cPort": {
551
+ "description": "The H2C port of the dependent service.",
552
+ "type": "integer"
553
+ },
554
+ "h2cTLSPort": {
555
+ "description": "The H2C TLS port of the dependent service.",
556
+ "type": "integer"
557
+ },
558
+ "tlsCAPath": {
559
+ "description": "Defines path to CA certificate for TLS connections to this ClowdApp. If present, this should override use of default TLS CA path.",
560
+ "type": "string"
561
+ },
498
562
  "apiPath": {
499
563
  "description": "The top level api path that the app should serve from /api/<apiPath> (deprecated, use apiPaths)",
500
564
  "type": "string"
@@ -539,6 +603,18 @@
539
603
  "tlsPort": {
540
604
  "description": "The TLS port of the dependent service.",
541
605
  "type": "integer"
606
+ },
607
+ "h2cPort": {
608
+ "description": "The H2C port of the dependent service.",
609
+ "type": "integer"
610
+ },
611
+ "h2cTLSPort": {
612
+ "description": "The H2C TLS port of the dependent service.",
613
+ "type": "integer"
614
+ },
615
+ "tlsCAPath": {
616
+ "description": "Defines path to CA certificate for TLS connections to this ClowdApp. If present, this should override use of default TLS CA path.",
617
+ "type": "string"
542
618
  }
543
619
  },
544
620
  "required": [
@@ -566,6 +642,29 @@
566
642
  "hostname",
567
643
  "port"
568
644
  ]
645
+ },
646
+ "DependencyEndpointV2": {
647
+ "id": "dependencyEndpointV2",
648
+ "type": "object",
649
+ "description": "V2 dependency endpoint with complete URI",
650
+ "properties": {
651
+ "uri": {
652
+ "description": "Complete URI including protocol, hostname, and port (e.g., 'http://service.ns.svc:8000', 'https://service:8443')",
653
+ "type": "string"
654
+ },
655
+ "ca_certificate": {
656
+ "description": "Path to CA certificate file for TLS/HTTPS connections. Only present for https:// URIs.",
657
+ "type": "string"
658
+ },
659
+ "authenticated": {
660
+ "description": "Indicates whether the client should authenticate when connecting to this endpoint. Always present (explicitly true or false). By default, true for cross-cluster dependencies (ClowdAppRef) and false for in-cluster dependencies (ClowdApp). This default can be overridden per-deployment via webServices.public.authenticated or webServices.private.authenticated on the ClowdApp or ClowdAppRef resource.",
661
+ "type": "boolean"
662
+ }
663
+ },
664
+ "required": [
665
+ "uri",
666
+ "authenticated"
667
+ ]
569
668
  }
570
669
  }
571
670
  }
@@ -25,6 +25,8 @@ module ClowderCommonRuby
25
25
  object_buckets
26
26
  dependency_endpoints
27
27
  private_dependency_endpoints
28
+ v2_dependency_endpoints
29
+ v2_private_dependency_endpoints
28
30
  end
29
31
 
30
32
  # List of Kafka Broker URLs.
@@ -83,5 +85,39 @@ module ClowderCommonRuby
83
85
  end
84
86
  end
85
87
  end
88
+
89
+ # V2 nested map using [appName][deploymentName]
90
+ # for the public services of requested applications.
91
+ def v2_dependency_endpoints
92
+ @v2_dependency_endpoints ||= parse_v2_endpoints(dependencyEndpoints)
93
+ end
94
+
95
+ # V2 nested map using [appName][deploymentName]
96
+ # for the private services of requested applications.
97
+ def v2_private_dependency_endpoints
98
+ @v2_private_dependency_endpoints ||= parse_v2_endpoints(privateDependencyEndpoints)
99
+ end
100
+
101
+ private
102
+
103
+ def parse_v2_endpoints(raw)
104
+ {}.tap do |endpts|
105
+ return endpts if raw.nil?
106
+
107
+ v2 = raw.is_a?(Hash) ? raw["v2"] : nil
108
+ return endpts if v2.nil?
109
+
110
+ v2.each do |app_name, deployments|
111
+ next if app_name.nil? || deployments.nil?
112
+
113
+ endpts[app_name] = {}
114
+ deployments.each do |dep_name, attrs|
115
+ next if dep_name.nil? || attrs.nil?
116
+
117
+ endpts[app_name][dep_name] = DependencyEndpointV2.new(attrs)
118
+ end
119
+ end
120
+ end
121
+ end
86
122
  end
87
123
  end
@@ -89,13 +89,13 @@ module ClowderCommonRuby
89
89
 
90
90
  # Redis configuration hash
91
91
  def configure_redis(config)
92
- inMemoryDb = config&.dig('inMemoryDb')
93
- redis_url = "redis://#{inMemoryDb.dig('hostname')}:#{inMemoryDb.dig('port')}"
92
+ inMemoryDb = config&.inMemoryDb
93
+ return {} unless inMemoryDb&.hostname
94
94
 
95
95
  {
96
- url: redis_url,
97
- password: inMemoryDb.dig('password'),
98
- ssl: inMemoryDb.dig('sslMode')
96
+ url: "redis://#{inMemoryDb.hostname}:#{inMemoryDb.port}",
97
+ password: inMemoryDb.password,
98
+ ssl: inMemoryDb.sslMode
99
99
  }
100
100
  end
101
101
 
@@ -45,6 +45,8 @@ module ClowderCommonRuby
45
45
  [].tap do |keys|
46
46
  keys << :privatePort
47
47
  keys << :publicPort
48
+ keys << :h2cPrivatePort
49
+ keys << :h2cPublicPort
48
50
  keys << :webPort
49
51
  keys << :tlsCAPath
50
52
  keys << :metricsPort
@@ -62,6 +64,8 @@ module ClowderCommonRuby
62
64
  keys << :hashCache
63
65
  keys << :hostname
64
66
  keys << :prometheusGateway
67
+ keys << :dependencyEndpoints
68
+ keys << :privateDependencyEndpoints
65
69
  end
66
70
  end
67
71
  end
@@ -418,6 +422,9 @@ module ClowderCommonRuby
418
422
  keys << :port
419
423
  keys << :app
420
424
  keys << :tlsPort
425
+ keys << :h2cPort
426
+ keys << :h2cTLSPort
427
+ keys << :tlsCAPath
421
428
  keys << :apiPath
422
429
  keys << :apiPaths
423
430
  end
@@ -444,6 +451,9 @@ module ClowderCommonRuby
444
451
  keys << :port
445
452
  keys << :app
446
453
  keys << :tlsPort
454
+ keys << :h2cPort
455
+ keys << :h2cTLSPort
456
+ keys << :tlsCAPath
447
457
  end
448
458
  end
449
459
  end
@@ -468,4 +478,26 @@ module ClowderCommonRuby
468
478
  end
469
479
  end
470
480
  end
481
+
482
+ class DependencyEndpointV2 < OpenStruct
483
+
484
+ def initialize(attributes)
485
+ super
486
+ raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
487
+
488
+ attributes = attributes.each_with_object({}) do |(k, v), h|
489
+ warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
490
+ h[k.to_sym] = v
491
+ end
492
+
493
+ end
494
+
495
+ def valid_keys
496
+ [].tap do |keys|
497
+ keys << :uri
498
+ keys << :ca_certificate
499
+ keys << :authenticated
500
+ end
501
+ end
502
+ end
471
503
  end
@@ -1,3 +1,3 @@
1
1
  module ClowderCommonRuby
2
- VERSION = '0.5.6'.freeze # Patch version is being automatically bumped
2
+ VERSION = '0.5.7'.freeze # Patch version is being automatically bumped
3
3
  end
data/sync_config.sh CHANGED
@@ -1,4 +1,9 @@
1
- #!/bin/bash
2
- cd bin/
3
- wget https://raw.githubusercontent.com/RedHatInsights/clowder/master/controllers/cloud.redhat.com/config/schema.json -O schema.json
4
- ./json_schema_ruby -o ../lib/clowder-common-ruby/types.rb schema.json
1
+ #!/usr/bin/env sh
2
+
3
+ if [ "$(command -v wget)" ]; then
4
+ wget https://raw.githubusercontent.com/RedHatInsights/clowder/master/controllers/cloud.redhat.com/config/schema.json -O ./bin/schema.json
5
+ else
6
+ curl https://raw.githubusercontent.com/RedHatInsights/clowder/master/controllers/cloud.redhat.com/config/schema.json -o ./bin/schema.json
7
+ fi
8
+
9
+ ./bin/json_schema_ruby -o ./lib/clowder-common-ruby/types.rb ./bin/schema.json
data/test.json CHANGED
@@ -1,101 +1,134 @@
1
1
  {
2
- "publicPort": 8000,
3
- "metricsPort": 9000,
4
- "metricsPath": "/metrics",
5
- "tlsCAPath": "/tlsCAPath",
6
- "logging": {
7
- "type": "cloudwatch",
8
- "cloudwatch": {
9
- "accessKeyId": "ACCESS_KEY",
10
- "secretAccessKey": "SECRET_ACCESS_KEY",
11
- "region": "EU",
12
- "logGroup": "base_app"
13
- }
14
- },
15
- "kafka": {
16
- "brokers": [
17
- {
18
- "hostname": "broker-host",
19
- "port": 27015,
20
- "cacert": "kafkaca"
21
- }
22
- ],
23
- "topics": [
24
- {
25
- "requestedName": "originalName",
26
- "name": "someTopic"
27
- }
28
- ]
29
- },
30
- "inMemoryDb": {
31
- "hostname": "redis",
32
- "username": "username",
33
- "password": "password",
34
- "sslMode": "false",
35
- "port": "6379"
36
- },
37
- "database": {
38
- "name": "dBaseName",
39
- "username": "username",
40
- "password": "password",
41
- "hostname": "hostname",
42
- "port": 5432,
43
- "pgPass": "testing",
44
- "adminUsername": "adminusername",
45
- "adminPassword": "adminpassword",
46
- "rdsCa": "ca",
47
- "sslMode": "verify-full"
48
- },
49
- "objectStore": {
50
- "hostname": "endpoint",
51
- "port" : 9292,
52
- "accessKey": "Testing",
53
- "secretKey": "Testing",
54
- "tls": false,
55
- "buckets": [
56
- {
57
- "accessKey": "accessKey1",
58
- "secretKey": "secretKey1",
59
- "requestedName": "reqname",
60
- "name": "name"
61
- }
62
- ]
2
+ "publicPort": 8000,
3
+ "metricsPort": 9000,
4
+ "metricsPath": "/metrics",
5
+ "tlsCAPath": "/tlsCAPath",
6
+ "logging": {
7
+ "type": "cloudwatch",
8
+ "cloudwatch": {
9
+ "accessKeyId": "ACCESS_KEY",
10
+ "secretAccessKey": "SECRET_ACCESS_KEY",
11
+ "region": "EU",
12
+ "logGroup": "base_app"
13
+ }
14
+ },
15
+ "kafka": {
16
+ "brokers": [
17
+ {
18
+ "hostname": "broker-host",
19
+ "port": 27015,
20
+ "cacert": "kafkaca"
21
+ }
22
+ ],
23
+ "topics": [
24
+ {
25
+ "requestedName": "originalName",
26
+ "name": "someTopic"
27
+ }
28
+ ]
29
+ },
30
+ "inMemoryDb": {
31
+ "hostname": "redis",
32
+ "username": "username",
33
+ "password": "password",
34
+ "sslMode": "false",
35
+ "port": "6379"
36
+ },
37
+ "database": {
38
+ "name": "dBaseName",
39
+ "username": "username",
40
+ "password": "password",
41
+ "hostname": "hostname",
42
+ "port": 5432,
43
+ "adminUsername": "adminusername",
44
+ "adminPassword": "adminpassword",
45
+ "rdsCa": "ca",
46
+ "sslMode": "verify-full"
47
+ },
48
+ "objectStore": {
49
+ "hostname": "endpoint",
50
+ "port": 9292,
51
+ "accessKey": "Testing",
52
+ "secretKey": "Testing",
53
+ "tls": false,
54
+ "buckets": [
55
+ {
56
+ "accessKey": "accessKey1",
57
+ "secretKey": "secretKey1",
58
+ "requestedName": "reqname",
59
+ "name": "name"
60
+ }
61
+ ]
62
+ },
63
+ "featureFlags": {
64
+ "hostname": "ff-server.server.example.com",
65
+ "port": 4242,
66
+ "scheme": "http"
67
+ },
68
+ "endpoints": [
69
+ {
70
+ "name": "endpoint1",
71
+ "app": "app1",
72
+ "hostname": "endpoint1.svc",
73
+ "port": 8000,
74
+ "tlsPort": 8001
63
75
  },
64
- "featureFlags": {
65
- "hostname": "ff-server.server.example.com",
66
- "port": 4242,
67
- "scheme": "http"
76
+ {
77
+ "name": "endpoint2",
78
+ "app": "app2",
79
+ "hostname": "endpoint2.svc",
80
+ "port": 8000,
81
+ "tlsPort": 8001
82
+ }
83
+ ],
84
+ "privateEndpoints": [
85
+ {
86
+ "name": "endpoint1",
87
+ "app": "app1",
88
+ "hostname": "endpoint1.svc",
89
+ "port": 10000,
90
+ "tlsPort": 10001
68
91
  },
69
- "endpoints": [
70
- {
71
- "name": "endpoint1",
72
- "app": "app1",
73
- "hostname": "endpoint1.svc",
74
- "port": 8000,
75
- "tlsPort": 8001
76
- },
77
- {
78
- "name": "endpoint2",
79
- "app": "app2",
80
- "hostname": "endpoint2.svc",
81
- "port": 8000,
82
- "tlsPort": 8001
92
+ {
93
+ "name": "endpoint2",
94
+ "app": "app2",
95
+ "hostname": "endpoint2.svc",
96
+ "port": 10000,
97
+ "tlsPort": 10001
98
+ }
99
+ ],
100
+ "dependencyEndpoints": {
101
+ "v2": {
102
+ "app1": {
103
+ "endpoint1": {
104
+ "uri": "http://endpoint1.svc:8000",
105
+ "authenticated": false
83
106
  }
84
- ],
85
- "privateEndpoints": [
86
- {
87
- "name": "endpoint1",
88
- "app": "app1",
89
- "hostname": "endpoint1.svc",
90
- "port": 10000,
91
- "tlsPort": 10001
92
- },
93
- {
94
- "name": "endpoint2",
95
- "app": "app2",
96
- "hostname": "endpoint2.svc",
97
- "port": 10000,
98
- "tlsPort": 10001
107
+ },
108
+ "app2": {
109
+ "endpoint2": {
110
+ "uri": "https://endpoint2.svc:8443",
111
+ "ca_certificate": "/cdapp/certs/service-ca.crt",
112
+ "authenticated": true
99
113
  }
100
- ]
114
+ }
115
+ }
116
+ },
117
+ "privateDependencyEndpoints": {
118
+ "v2": {
119
+ "app1": {
120
+ "endpoint1": {
121
+ "uri": "http://endpoint1.svc:10000",
122
+ "authenticated": false
123
+ }
124
+ },
125
+ "app2": {
126
+ "endpoint2": {
127
+ "uri": "https://endpoint2.svc:10443",
128
+ "ca_certificate": "/cdapp/certs/service-ca.crt",
129
+ "authenticated": true
130
+ }
131
+ }
132
+ }
133
+ }
101
134
  }
metadata CHANGED
@@ -1,17 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clowder-common-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Red Hat Developers
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2025-07-29 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
12
  description: This is a ruby interface for preparing Clowder variables.
14
- email:
15
13
  executables: []
16
14
  extensions: []
17
15
  extra_rdoc_files: []
@@ -37,7 +35,6 @@ homepage: https://github.com/RedHatInsights/clowder-common-ruby
37
35
  licenses:
38
36
  - Apache-2.0
39
37
  metadata: {}
40
- post_install_message:
41
38
  rdoc_options: []
42
39
  require_paths:
43
40
  - lib
@@ -52,8 +49,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
49
  - !ruby/object:Gem::Version
53
50
  version: '0'
54
51
  requirements: []
55
- rubygems_version: 3.4.22
56
- signing_key:
52
+ rubygems_version: 3.6.9
57
53
  specification_version: 4
58
54
  summary: Supporting files and libraries for Clowder environmental variables.
59
55
  test_files: []