Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

procedures: Add new requirement for some objects to have part-of label #2170

Merged
merged 11 commits into from
Nov 26, 2021
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,44 @@ $ {orch-cli} create namespace {prod-namespace}
+
[subs="+quotes,attributes"]
----
$ {orch-cli} create secret generic <server-database-credentials> \ <1>
--from-literal=user=<database-user> \ <2>
--from-literal=password=<database-password> \ <3>
$ {orch-cli} create secret generic _<server-database-credentials>_ \ <1>
--from-literal=user=__<database-user>__ \ <2>
--from-literal=password=__<database-password>__ \ <3>
-n {prod-namespace}
----
<1> Secret name to store {prod-short} server database credentials
<2> {prod-short} server database username
<3> {prod-short} server database password

. Add the required labels to the {prod-short} server database credentials secret:
+
[subs="+quotes,attributes"]
----
$ {orch-cli} label secret __<server-database-credentials>__ \ <1>
app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
----
<1> Secret name to store {prod-short} server database credentials

. Create a secret to store {identity-provider} database credentials:
+
[subs="+quotes,attributes"]
----
$ {orch-cli} create secret generic <identity-database-credentials> \ <1>
--from-literal=password=<identity-database-password> \ <2>
$ {orch-cli} create secret generic _<identity-database-credentials>_ \ <1>
--from-literal=password=__<identity-database-password>__ \ <2>
-n {prod-namespace}
----
<1> Secret name to store {identity-provider} database credentials
<2> {identity-provider} database password

. Add the required labels to the {identity-provider} database credentials secret:
+
[subs="+quotes,attributes"]
----
$ {orch-cli} label secret __<identity-database-credentials>__ \ <1>
app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
----
<1> Secret name to store {identity-provider} database credentials

. Deploy {prod} by executing the `{prod-cli}` command with applying a patch. For example:
+
[subs="+quotes,+attributes"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,23 @@ $ {orch-cli} create {orch-namespace} {prod-namespace}
+
[subs="+quotes,attributes"]

This comment was marked as off-topic.

This comment was marked as resolved.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@max-cx, we should not use 'shell' highlighting on command-line stuff. When you type on the command line, there's no highlighting either. The syntax-highlight feature should only be used when you're listing code. So, for 'shell', it would be for listing the content of shell scripts.

Not sure what you mean by because \ after $ doesn't render ...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened a separate issue for this: https://issues.redhat.com/browse/RHDEVDOCS-3498

This comment was marked as off-topic.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, this is outside of the scope of this PR because this syntax is in the rest of this file and possibly in other files as well (so I've opened a new issue for this).

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an explanatory comment to the JIRA issue. TL;DR: the not-rendered backslash is intentional.

----
$ {orch-cli} create secret TLS $\{secret} \ <1>
--key $\{key_file} \ <2>
--cert $\{cert_file} \ <3>
$ {orch-cli} create secret TLS $\{secret} \ <1>
--key $\{key_file} \ <2>
--cert $\{cert_file} \ <3>
-n {prod-namespace}
----
<1> The TLS secret name
<2> A file with the private key
mmorhun marked this conversation as resolved.
Show resolved Hide resolved
<3> A file with the certificate

. Add the required labels to the secret:
+
[subs="+quotes,attributes"]
----
$ {orch-cli} label secret $\{secret} \ <1>
app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
----
<1> The TLS secret name

. Set the following values in the Custom Resource:
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,18 @@ endif::[]
====

ifeval::["{project-context}" == "che"]
.For {prod-short} deployed using Operators
.For {prod-short} deployed using Operator
endif::[]

Update the `gitSelfSignedCert` property. To do that, execute:
. Add the required labels to the ConfigMap:
+
[subs="+quotes,attributes"]
----
$ {orch-cli} label configmap che-git-self-signed-cert app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
mmorhun marked this conversation as resolved.
Show resolved Hide resolved
----

. Update the `gitSelfSignedCert` property. To do that, execute:
+
[subs="+attributes"]
----
$ {orch-cli} patch checluster/{prod-checluster} -n {prod-namespace} --type=json \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ include::example$snip_importing-untrusted-tls-certificates_1.adoc[]
$ {orch-cli} create configmap ca-certs --from-file=__<certificate-file-path>__ -n={prod-namespace}
----
+
To apply more than one certificate, add another `--from-file=_<certificate-file-path>_` option to the above command.
To apply more than one certificate, add another `--from-file=__<certificate-file-path>__` option to the above command.
mmorhun marked this conversation as resolved.
Show resolved Hide resolved

. Add required labels to the ConfigMap:
+
[subs="+attributes,+quotes"]
----
$ {orch-cli} label configmap ca-certs app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
----
tolusha marked this conversation as resolved.
Show resolved Hide resolved

mmorhun marked this conversation as resolved.
Show resolved Hide resolved
. During the installation process, when creating the `CheCluster` custom resource, configure the right name for the created ConfigMap.
+
Expand Down Expand Up @@ -121,7 +128,14 @@ include::example$snip_importing-untrusted-tls-certificates_1.adoc[]
$ {orch-cli} create configmap __<config-map-name>__ --from-file=__<certificate-file-path>__ -n={prod-namespace} -o yaml --dry-run | {orch-cli} apply -f -
----
+
To apply more than one certificate, add another `--from-file=_<certificate-file-path>_` option to the above command.
To apply more than one certificate, add another `--from-file=__<certificate-file-path>__` option to the above command.
mmorhun marked this conversation as resolved.
Show resolved Hide resolved

. Add required labels to the ConfigMap:
+
[subs="+attributes,+quotes"]
----
$ {orch-cli} label configmap ca-certs app.kubernetes.io/part-of=che.eclipse.org -n {prod-namespace}
----
tolusha marked this conversation as resolved.
Show resolved Hide resolved

mmorhun marked this conversation as resolved.
Show resolved Hide resolved
. Configure the {prod-short} installation to use the ConfigMap:
+
Expand Down