Skip to content

Commit

Permalink
Assume "examples" namespace
Browse files Browse the repository at this point in the history
TLS examples are namespace-sensitive. In CI we use "examples" namespace
so let's use that.
  • Loading branch information
mkuratczyk committed Mar 15, 2021
1 parent 705e670 commit 47326c8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/examples/federation-over-tls/README.md
Expand Up @@ -8,6 +8,9 @@ First, please follow [TLS example](../tls) to create a TLS secret. Alternatively
The certificate expects to have a `ClusterIssuer` named `selfsigned-issuer`. Feel free to adapt this value accordingly to your
cert-manager installation.

**NOTE** `certificate.yaml` contains the word "examples" multiple times - in the `namespace` and `dnsNames` properties.
You need to replace all occurrences with your desired namespace. `dnsNames` values need to contain the actual namespace name this cluster will be deployed to, otherwise TLS will fail due to hostname mismatch.

In addition, you have to create a ConfigMap to import the definitions with the topology pre-defined.

```bash
Expand Down
5 changes: 4 additions & 1 deletion docs/examples/federation-over-tls/certificate.yaml
Expand Up @@ -2,9 +2,12 @@ apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: selfsigned-cert
namespace: examples
spec:
dnsNames:
- "federation-server-0.federation-nodes.default"
# The following values need to contain the actual namespace you are deploying to;
# replace "examples" with your desired namespace
- "federation-server-0.federation-nodes.examples"
secretName: tls-secret
issuerRef:
kind: ClusterIssuer
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/import-definitions/test.sh
Expand Up @@ -5,7 +5,7 @@ pushd "$(mktemp -d)" || exit 1
set -x
kubectl exec import-definitions-server-0 -- rabbitmqadmin \
--format=raw_json --vhost=hello-world --username=hello-world \
--password=hello-world --host=import-definitions.default.svc \
--password=hello-world --host=import-definitions.examples.svc \
list queues &> queues.json

[[ "$(jq '.[0].name' queues.json)" == '"cq1"' ]] || exit 2
Expand Down

0 comments on commit 47326c8

Please sign in to comment.