clowder-common-ruby 0.5.4 → 0.5.6
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 +4 -4
- data/bin/schema.json +26 -0
- data/lib/clowder-common-ruby/types.rb +25 -0
- data/lib/clowder-common-ruby/version.rb +1 -1
- data/test.json +7 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a0183d53d4a43907739edb12a4563ada87e5b1264280c1eb6bfd9ac3d1f6d63
|
4
|
+
data.tar.gz: 611254dedf957e0742eb6ae96015db798358c588fabe2b83de047aaeac79a2eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14b05ed1a3bc92792a2caa004d1d0be3935134778ce15e6865f8e7d099d9df16f7834dac9ced6def83d04576fccb78bc0aa53d434750608ea44d119bebb0338f
|
7
|
+
data.tar.gz: 3c6ef3e9b0302902f89b126e83df570c28a878d55d094e4b87ce11e3037c157258400f0cb3b6f03407099c685aff362c7ba59f56f49b07228d022300423cb920
|
data/bin/schema.json
CHANGED
@@ -74,6 +74,13 @@
|
|
74
74
|
"hashCache": {
|
75
75
|
"description": "A set of configMap/secret hashes",
|
76
76
|
"type": "string"
|
77
|
+
},
|
78
|
+
"hostname": {
|
79
|
+
"description": "The external hostname of the deployment, where applicable",
|
80
|
+
"type": "string"
|
81
|
+
},
|
82
|
+
"prometheusGateway": {
|
83
|
+
"$ref": "#/definitions/PrometheusGatewayConfig"
|
77
84
|
}
|
78
85
|
},
|
79
86
|
"required": [
|
@@ -540,6 +547,25 @@
|
|
540
547
|
"port",
|
541
548
|
"app"
|
542
549
|
]
|
550
|
+
},
|
551
|
+
"PrometheusGatewayConfig": {
|
552
|
+
"id": "prometheusGatewayConfig",
|
553
|
+
"type": "object",
|
554
|
+
"description": "Prometheus Gateway Configuration",
|
555
|
+
"properties": {
|
556
|
+
"hostname": {
|
557
|
+
"description": "Defines the hostname for the Prometheus Gateway server configuration.",
|
558
|
+
"type": "string"
|
559
|
+
},
|
560
|
+
"port": {
|
561
|
+
"description": "Defines the port for the Prometheus Gateway server configuration.",
|
562
|
+
"type": "integer"
|
563
|
+
}
|
564
|
+
},
|
565
|
+
"required": [
|
566
|
+
"hostname",
|
567
|
+
"port"
|
568
|
+
]
|
543
569
|
}
|
544
570
|
}
|
545
571
|
}
|
@@ -12,6 +12,7 @@ module ClowderCommonRuby
|
|
12
12
|
attr_accessor :featureFlags
|
13
13
|
attr_accessor :endpoints
|
14
14
|
attr_accessor :privateEndpoints
|
15
|
+
attr_accessor :prometheusGateway
|
15
16
|
|
16
17
|
def initialize(attributes)
|
17
18
|
super
|
@@ -37,6 +38,7 @@ module ClowderCommonRuby
|
|
37
38
|
attributes.fetch(:privateEndpoints, []).each do |attr|
|
38
39
|
@privateEndpoints << PrivateDependencyEndpoint.new(attr)
|
39
40
|
end
|
41
|
+
@prometheusGateway = PrometheusGatewayConfig.new(attributes.fetch(:prometheusGateway, {}))
|
40
42
|
end
|
41
43
|
|
42
44
|
def valid_keys
|
@@ -58,6 +60,8 @@ module ClowderCommonRuby
|
|
58
60
|
keys << :privateEndpoints
|
59
61
|
keys << :BOPURL
|
60
62
|
keys << :hashCache
|
63
|
+
keys << :hostname
|
64
|
+
keys << :prometheusGateway
|
61
65
|
end
|
62
66
|
end
|
63
67
|
end
|
@@ -443,4 +447,25 @@ module ClowderCommonRuby
|
|
443
447
|
end
|
444
448
|
end
|
445
449
|
end
|
450
|
+
|
451
|
+
class PrometheusGatewayConfig < OpenStruct
|
452
|
+
|
453
|
+
def initialize(attributes)
|
454
|
+
super
|
455
|
+
raise 'The input argument (attributes) must be a hash' if (!attributes || !attributes.is_a?(Hash))
|
456
|
+
|
457
|
+
attributes = attributes.each_with_object({}) do |(k, v), h|
|
458
|
+
warn "The input [#{k}] is invalid" unless valid_keys.include?(k.to_sym)
|
459
|
+
h[k.to_sym] = v
|
460
|
+
end
|
461
|
+
|
462
|
+
end
|
463
|
+
|
464
|
+
def valid_keys
|
465
|
+
[].tap do |keys|
|
466
|
+
keys << :hostname
|
467
|
+
keys << :port
|
468
|
+
end
|
469
|
+
end
|
470
|
+
end
|
446
471
|
end
|
data/test.json
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clowder-common-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Red Hat Developers
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a ruby interface for preparing Clowder variables.
|
14
|
-
email:
|
14
|
+
email:
|
15
15
|
executables: []
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
@@ -37,7 +37,7 @@ homepage: https://github.com/RedHatInsights/clowder-common-ruby
|
|
37
37
|
licenses:
|
38
38
|
- Apache-2.0
|
39
39
|
metadata: {}
|
40
|
-
post_install_message:
|
40
|
+
post_install_message:
|
41
41
|
rdoc_options: []
|
42
42
|
require_paths:
|
43
43
|
- lib
|
@@ -52,8 +52,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
52
|
- !ruby/object:Gem::Version
|
53
53
|
version: '0'
|
54
54
|
requirements: []
|
55
|
-
rubygems_version: 3.
|
56
|
-
signing_key:
|
55
|
+
rubygems_version: 3.4.22
|
56
|
+
signing_key:
|
57
57
|
specification_version: 4
|
58
58
|
summary: Supporting files and libraries for Clowder environmental variables.
|
59
59
|
test_files: []
|