-
Bug
-
Resolution: Done
-
Major
-
None
-
7.1, 7.3, 7.4, 7.2
-
2019 Week 41-43 (from Okt 7)
-
1
-
+
In 3.3. (Optional) Providing the Git hooks directory of the document,
the following command are documented in step3.
oc create configmap git_hooks --from-file=<file_1>=<file_1> --from-file=<file_2>=<file_2>
oc create configmap git_hooks --from-file=post-commit=post-commit
oc set volume dc/<myapp>-rhpamcentr --add --type configmap --configmap-name git_hooks --mount-path=<git_hooks_dir> --name=git_hooks
As above, 'git_hooks' is specified as configmap name.
But configMap can't be created with this name.
$ oc create configmap git_hooks --from-file=post-commit=post-commit The ConfigMap "git_hooks" is invalid: metadata.name: Invalid value: "git_hooks": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*') $
As stated in the error, it seems that '_' is not allowed as configMap name.
it should be, for example:
oc create configmap git-hooks --from-file=post-commit=post-commit
i.e. specify 'git-hooks' instead of 'git_hooks'.
I know this is just example, but it would be better to avoid an error like this.
There are no Sub-Tasks for this issue.