You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added support to configure server certificates for TLS
* Improved logic to set and log pod active labels as part of readiness check
* Updated names and file locations for readiness check related files to align with long-term broker file system strategy
* Renamed internal script setup-config-sync to startup-broker
* Added more default exposed ports, unified port names
* Added automation coverage for TLS configuration
* Fixed reference to Helm hub
* Updated chart version to 2.4
Closes issues #87, #92, #94, #98
kubectl get statefulset,svc,pods,pvc,pv --show-labels
58
61
echo "Waiting for broker to become active"
59
62
sleep 40; kubectl describe nodes
@@ -62,19 +65,15 @@ jobs:
62
65
until kubectl get pods --show-labels | grep pubsubplus-2 | grep -m 1 -E '1/1'; do sleep 10; done
63
66
until kubectl get pods --show-labels | grep pubsubplus- | grep -m 1 -E 'active=true'; do sleep 10; done
64
67
kubectl get statefulset,svc,pods,pvc,pv --show-labels
65
-
if [[ `kubectl get po --show-labels | grep -c "1/1"` -ne 3 ]]; then echo "Some pods are not ready!"; kubectl get po --show-labels; exit 1; fi
66
-
#
67
-
kubectl logs my-release-pubsubplus-0 | grep [.]sh
68
-
kubectl logs my-release-pubsubplus-1 | grep [.]sh
69
-
kubectl logs my-release-pubsubplus-2 | grep [.]sh
70
-
#
68
+
bash -c 'if [[ `kubectl get po --show-labels | grep -c "1/1"` -ne 3 ]]; then echo "Some pods are not ready!"; kubectl get po --show-labels; exit 1; fi'
sleep 20; gcloud compute disks list | grep gha-test | sed 1d $rpt | while read -r a b c; do gcloud compute disks delete $a --zone $b --quiet || echo "Run into issues with deleting $a, skipping"; done
127
+
gcloud compute disks list | grep gha-test | sed 1d $rpt | while read -r a b c; do gcloud compute disks delete $a --zone $b --quiet; done
Copy file name to clipboardExpand all lines: README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,11 @@ The [Solace PubSub+ Platform](https://solace.com/products/platform/)'s [software
6
6
7
7
## Overview
8
8
9
-
This document provides a quick getting started guide to install a software event broker in various configurations onto a [Kubernetes](https://kubernetes.io/docs/home/) cluster. The recommended software event broker version is 9.4 or later.
9
+
This project is a best practice template intended for development and demo purposes. The tested and recommended Solace PubSub+ Software Event Broker version is 9.8.
10
10
11
-
*Detailed**documentation* is provided in the [Solace PubSub+ Software Event Broker on Kubernetes Documentation](docs/PubSubPlusK8SDeployment.md).
11
+
This document provides a quick getting started guide to install a software event broker in various configurations onto a [Kubernetes](https://kubernetes.io/docs/home/) cluster.
12
12
13
-
This quick start is intended mainly for development and demo purposes. Consult the [Deployment Considerations](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/docs/PubSubPlusK8SDeployment.md#pubsub-event-broker-deployment-considerations) section of the Documentation when planning your deployment.
13
+
Detailed documentation is provided in the [Solace PubSub+ Software Event Broker on Kubernetes Documentation](docs/PubSubPlusK8SDeployment.md). Consult the [Deployment Coonsiderations](https://github.com/SolaceProducts/pubsubplus-kubernetes-quickstart/blob/master/docs/PubSubPlusK8SDeployment.md#pubsub-event-broker-deployment-considerations) section of the Documentation when planning your deployment.
14
14
15
15
This document is applicable to any platform supporting Kubernetes, with specific hints on how to set up a simple MiniKube deployment on a Linux-based machine. To view examples of other Kubernetes platforms see:
16
16
@@ -26,7 +26,7 @@ Solace PubSub+ Software Event Broker can be deployed in either a three-node High
26
26
27
27
We recommend using the Helm tool for convenience. An [alternative method](/docs/PubSubPlusK8SDeployment.md#alternative-deployment-with-generating-templates-for-the-kubernetes-kubectl-tool) using generated templates is also provided.
28
28
29
-
In this quick start we go through the steps to set up a PubSub+ Software Event Broker using [Solace PubSub+ Helm charts](//hub.helm.sh/charts/solace).
29
+
In this quick start we go through the steps to set up a PubSub+ Software Event Broker using [Solace PubSub+ Helm charts](//artifacthub.io/packages/search?ts_query_web=solace).
30
30
31
31
There are three Helm chart variants available with default small-size configurations:
32
32
1. `pubsubplus-dev` - recommended PubSub+ Software Event Broker for Developers (standalone) - no guaranteed performance
-[Using ImagePullSecrets for signed images](#using-imagepullsecrets-for-signed-images)
@@ -242,6 +245,48 @@ This label is set by the `readiness_check.sh` script in `pubsubplus/templates/so
242
245
- the Kubernetes service account associated with the Solace pod must have sufficient rights to patch the pod's label when the active event broker is service ready
243
246
- the Solace pods must be able to communicate with the Kubernetes API at `kubernetes.default.svc.cluster.local` at port $KUBERNETES_SERVICE_PORT. You can find out the address and port by [SSH into the pod](#ssh-access-to-individual-message-brokers).
244
247
248
+
### Enabling use of TLS to access broker services
249
+
250
+
#### Setting up TLS
251
+
252
+
Default deployment does not have TLS over TCP enabled to access broker services. Although the exposed `service.ports` include ports for secured TCP, only the insecure ports can be used by default.
253
+
254
+
To enable accessing services over TLS a server key and certificate must be configured on the broker.
255
+
256
+
It is assumed that a provider out of scope of this document will be used to create a server key and certificate for the event broker, that meet the [requirements described in the Solace Documentation](https://docs.solace.com/Configuring-and-Managing/Managing-Server-Certs.htm). If the server key is password protected it shall be transformed to an unencrypted key, e.g.: `openssl rsa -in encryedprivate.key -out unencryed.key`.
257
+
258
+
The server key and certificate must be packaged in a Kubernetes secret, for example by [creating a TLS secret](https://kubernetes.io/docs/concepts/configuration/secret/#tls-secrets). Example:
Important: it is not possible to update an existing deployment to enable TLS that has been created without TLS enabled, by a simply using the [modify deployment](#modifying-or-upgrading-a-deployment) procedure. In this case, for the first time, certificates need to be [manually loaded and set up](//docs.solace.com/Configuring-and-Managing/Managing-Server-Certs.htm) on each broker node. After that it is possible to use `helm upgrade` with a secret specified.
281
+
282
+
#### Rotating the server key
283
+
284
+
In the event the server key or certificate need to be rotated a new Kubernetes secret must be created, which may require deleting and recreating the old secret if using the same name.
285
+
286
+
Next, if using the same secret name, the broker Pods need to be restarted, one at a time waiting to reach `1/1` availability before continuing on the next one: starting with the Monitor (ordinal -2), followed by the node in backup role with `active=false` label, and finally the third node. If using a new secret name, the [modify deployment](#modifying-or-upgrading-a-deployment) procedure can be used and an automatic rolling update will follow these steps restarting the nodes one at a time.
287
+
288
+
Note: a pod restart will result in provisioning the server certificate from the secret again so it will revert back from any other server certificate that may have been provisioned on the broker through other mechanism.
289
+
245
290
### The PubSub+ Software Event Broker Docker image
246
291
247
292
The `image.repository` and `image.tag` parameters combined specify the PubSub+ Software Event Broker Docker image to be used for the deployment. They can either point to an image in a public or a private Docker container registry.
@@ -318,7 +363,7 @@ If other settings control `fsGroup` and `runAsUser`, e.g: when using a [PodSecur
318
363
319
364
#### Securing Helm v2
320
365
321
-
Using current Helm v2, Helm's server-side component Tiller must be installed in your Kubernetes environment with rights granted to manage deployments. By default, Tiller is deployed in a permissive configuration. There are best practices to secure Helm and Tiller, and they need to be applied carefully if strict security is required; for example, in a production environment.
366
+
Using Helm v2, Helm's server-side component Tiller must be installed in your Kubernetes environment with rights granted to manage deployments. By default, Tiller is deployed in a permissive configuration. There are best practices to secure Helm and Tiller, and they need to be applied carefully if strict security is required; for example, in a production environment.
322
367
323
368
[Securing your Helm Installation](//v2.helm.sh/docs/using_helm/#securing-your-helm-installation) provides an overview of the Tiller-related security issues and recommended best practices.
324
369
@@ -329,6 +374,9 @@ Particularly, the [Role-based Access Control section of the Helm documentation](
329
374
Services require [pod label "active"](#using-pod-label-active-to-identify-the-active-event-broker-node) of the serving event broker.
330
375
* In a controlled environment it may be necessary to add a [NetworkPolicy](//kubernetes.io/docs/concepts/services-networking/network-policies/) to enable [required communication](#using-pod-label-active-to-identify-the-active-event-broker-node).
331
376
377
+
#### Securing TLS server key and certificate
378
+
379
+
Using secrets for TLS server keys and certificates follows Kubernetes recommendations, however, particularly in a production environment, additional steps are required to ensure only authorized access to these secrets following Kubernetes industry best practices, including setting tight RBAC permissions and fixing possible security holes.
Copy file name to clipboardExpand all lines: pubsubplus/README.md
+4
Original file line number
Diff line number
Diff line change
@@ -91,6 +91,10 @@ For more ways to override default chart values, refer to [Customizing the Helm C
91
91
|`securityContext.runAsUser`| Specifies `runAsUser` in pod security context | set to default PubSub+ appuser id 1000001 |
92
92
|`serviceAccount.create`|`true` will create a service account dedicated to the deployment in the namespace |`true`|
93
93
|`serviceAccount.name`| Refer to https://helm.sh/docs/topics/chart_best_practices/rbac/#using-rbac-resources| Undefined |
94
+
|`tls.enabled`| Enable to use TLS to access exposed broker services |`false` (not enabled) |
95
+
|`tls.serverCertificatesSecret`| Name of the Kubernetes Secret that contains the certificates - required if TLS is enabled | Undefined |
96
+
|`tls.certFilename`| Name of the Certificate file in the `serverCertificatesSecret`|`tls.crt`|
97
+
|`tls.certKeyFilename`| Name of the Key file in the `serverCertificatesSecret`|`tls.key`|
94
98
|`service.type`| How to expose the service: options include ClusterIP, NodePort, LoadBalancer |`LoadBalancer`|
95
99
|`service.annotations`| service.annotations allows to add provider-specific service annotations | Undefined |
96
100
|`service.ports`| Define PubSub+ service ports exposed. servicePorts are external, mapping to cluster-local pod containerPorts | initial set of frequently used ports, refer to values.yaml |
0 commit comments