-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from rabbitmq/cert-manager
Manifests and documentation for people with or without cert-manager
- Loading branch information
Showing
10 changed files
with
402 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# RabbitMQ Messaging Topology Kubernetes Operator | ||
|
||
# Copyright 2021 VMware, Inc. | ||
# | ||
# This product is licensed to you under the Mozilla Public license, Version 2.0 (the "License"). You may not use this product except in compliance with the Mozilla Public License. | ||
# | ||
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. | ||
namespace: rabbitmq-system | ||
|
||
resources: | ||
- ../../base | ||
- ../../../certmanager | ||
|
||
vars: | ||
- name: SERVICE_NAMESPACE # namespace of the service | ||
objref: | ||
kind: Service | ||
version: v1 | ||
name: webhook-service | ||
fieldref: | ||
fieldpath: metadata.namespace | ||
- name: SERVICE_NAME | ||
objref: | ||
kind: Service | ||
version: v1 | ||
name: webhook-service | ||
- name: CERTIFICATE_NAMESPACE # namespace of the certificate CR | ||
objref: | ||
kind: Certificate | ||
group: cert-manager.io | ||
version: v1 | ||
name: serving-cert # this name should match the one in certificate.yaml | ||
fieldref: | ||
fieldpath: metadata.namespace | ||
- name: CERTIFICATE_NAME | ||
objref: | ||
kind: Certificate | ||
group: cert-manager.io | ||
version: v1 | ||
name: serving-cert # this name should match the one in certificate.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
namespace: rabbitmq-system | ||
|
||
resources: | ||
- ../../base | ||
- ../cert-manager | ||
|
||
patches: | ||
- manager_image_patch.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
namespace: rabbitmq-system | ||
|
||
resources: | ||
- ../../base | ||
- ../cert-manager | ||
|
||
patches: | ||
- manager_image_patch.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# RabbitMQ Messaging Topology Kubernetes Operator | ||
|
||
# Copyright 2021 VMware, Inc. | ||
# | ||
# This product is licensed to you under the Mozilla Public license, Version 2.0 (the "License"). You may not use this product except in compliance with the Mozilla Public License. | ||
# | ||
# This product may include a number of subcomponents with separate copyright notices and license terms. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. | ||
|
||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: rabbitmq-system | ||
images: | ||
- name: rabbitmqoperator/messaging-topology-operator-dev | ||
newName: rabbitmqoperator/messaging-topology-operator | ||
newTag: latest | ||
|
||
resources: | ||
- ../../default/overlays/cert-manager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Installation without cert-manager | ||
|
||
Before deploying Messaging Topology Operator, you need to have: | ||
|
||
1. A Running k8s cluster | ||
2. RabbitMQ [Cluster Operator](https://github.com/rabbitmq/cluster-operator) installed in the k8s cluster | ||
3. A [RabbitMQ cluster](https://github.com/rabbitmq/cluster-operator/tree/main/docs/examples) deployed using the Cluster Operator | ||
|
||
## Installation | ||
|
||
Download the latest release manifests https://github.com/rabbitmq/messaging-topology-operator/releases/latest/download/messaging-topology-operator.yml. | ||
|
||
The Messaging Topology Operator has multiple [admission webhooks](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/). You need to generate the webhook certificate and place it in multiple places in the manifest: | ||
|
||
1. Generate certificates for the Webhook. Certificates must be valid for `webhook-service.rabbitmq-system.svc`. `webhook-service` is the name of the webhook service object defined in release manifest `messaging-topology-operator.yml.`. `rabbitmq-system` is the namespace of the service. | ||
2. Create a k8s secret object with name `webhook-server-cert` in namespace `rabbitmq-system`. The secret object must contain following keys: `ca.crt`, `tls.key`, and `tls.key`. For example: | ||
```yaml | ||
apiVersion: v1 | ||
kind: Secret | ||
type: kubernetes.io/tls | ||
metadata: | ||
name: webhook-server-cert | ||
namespace: rabbitmq-system | ||
data: | ||
ca.crt: # ca cert that can be used to validate the webhook's server certificate | ||
tls.crt: # generated certificate | ||
tls.key: # generated key | ||
``` | ||
This secret will be mounted to the operator container, where all webhooks will run from. | ||
1. Add webhook ca certificate in downloaded release manifest `messaging-topology-operator.yml`. There are 6 admission webhooks, one for each CRD type. | ||
Look for keyword `caBundle` in the manifest, and paste the webhook ca cert in there (6 places because there are 6 webhooks). | ||
1. Now you are ready to deploy. If you have `kubectl` configured to access your running k8s cluster, you can then run: | ||
|
||
```bash | ||
kubectl apply -f messaging-topology-operator.yml | ||
``` |
Oops, something went wrong.