uffizzi_core 2.1.14 → 2.1.16
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d23221496923c614cfbe72130937262656e0c94ca63520e2b139840dc600ff5
|
4
|
+
data.tar.gz: 4543690c79b6eb09973967d351e3cbd10192f28af4af6f0b61627c5cf58bb059
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcd475dbad950b94a1cf13fbc5689b20de5e819ac8507229e1c248a08326afa45f9bc322174d5dbf86b1cb173f5b7d05c68bad1e649aad41e022b1bb368e4487
|
7
|
+
data.tar.gz: 86fa458a5f7631abf335dc2709533ecde2639c28b81c811ee051ff9d502e88d68b2507e6f9b6eb7d4bc0c48181570381ffe40d73a2ae37263aed30a4c009c87f
|
@@ -8,6 +8,11 @@ class UffizziCore::ComposeFile::Parsers::ServicesParserService
|
|
8
8
|
raise UffizziCore::ComposeFile::ParseError, I18n.t('compose.no_services') if services.nil? || services.keys.empty?
|
9
9
|
|
10
10
|
services.keys.map do |service|
|
11
|
+
unless valid_service_name?(service)
|
12
|
+
raise UffizziCore::ComposeFile::ParseError,
|
13
|
+
I18n.t('compose.invalid_service_name', value: service)
|
14
|
+
end
|
15
|
+
|
11
16
|
service_data = prepare_service_data(service, services.fetch(service), global_configs_data,
|
12
17
|
global_secrets_data, compose_payload, global_named_volume_names)
|
13
18
|
|
@@ -77,5 +82,11 @@ class UffizziCore::ComposeFile::Parsers::ServicesParserService
|
|
77
82
|
|
78
83
|
volume_parser_module.parse(volumes, additional_data)
|
79
84
|
end
|
85
|
+
|
86
|
+
# All services are added as Additional Hosts in Kubernetes and must be RFC 123 compliant
|
87
|
+
def valid_service_name?(name)
|
88
|
+
rfc_123_pattern = /\A(?!-)[a-z0-9-]{1,63}(?<!-)\z/
|
89
|
+
name.match?(rfc_123_pattern)
|
90
|
+
end
|
80
91
|
end
|
81
92
|
end
|
data/config/locales/en.yml
CHANGED
@@ -16,6 +16,7 @@ en:
|
|
16
16
|
invalid_file: 'Syntax error: %{err} at line %{line} column %{column}'
|
17
17
|
invalid_config_option: Invalid config option '%{value}' - only a-zA-Z0-9._- characters are allowed
|
18
18
|
no_services: Service services has neither an image nor a build context specified. At least one must be provided.
|
19
|
+
invalid_service_name: "Invalid service name '%{value}': a service name must consist of lower case alphanumeric characters, ''-'', and must start and end with an alphanumeric character"
|
19
20
|
no_ingress: Service ingress has not been defined.
|
20
21
|
invalid_image_value: Invalid image value '%{value}'
|
21
22
|
unprocessable_image: Invalid credential '%{value} or image does not exist'
|
data/lib/uffizzi_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uffizzi_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Thurman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-04-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aasm
|