Skip to content

Commit 0712f0c

Browse files
Merge pull request #246 from numtide/feat/release-install-manifests
feat(ci): generate install manifests for releases
2 parents ab56cc6 + 2e963f8 commit 0712f0c

File tree

5 files changed

+91
-24
lines changed

5 files changed

+91
-24
lines changed

.github/workflows/build-and-release.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,18 @@ jobs:
128128
IMAGE="ghcr.io/${{ github.repository }}"
129129
docker tag "$IMAGE:${{ github.sha }}" "$IMAGE:latest"
130130
docker push "$IMAGE:latest"
131+
132+
validate-installer:
133+
needs: [ test-go ]
134+
runs-on: ubuntu-latest
135+
steps:
136+
- name: Check out code
137+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
138+
139+
- name: Install Go
140+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
141+
with:
142+
go-version-file: go.mod
143+
144+
- name: Validate install manifests
145+
run: make build-installer

.github/workflows/tags.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,23 @@ jobs:
6666
--tag "$IMAGE:$VERSION_TAG" \
6767
"$IMAGE:$SHA_TAG"
6868
69+
- name: Install Go
70+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
71+
with:
72+
go-version-file: go.mod
73+
74+
- name: Generate install manifests
75+
run: |
76+
make build-installer \
77+
IMG="ghcr.io/${{ github.repository }}:${{ github.ref_name }}"
78+
6979
- name: Create GitHub release
7080
env:
7181
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7282
run: |
7383
gh release create "${{ github.ref_name }}" \
7484
--generate-notes \
75-
--verify-tag
85+
--verify-tag \
86+
dist/install.yaml \
87+
dist/install-certmanager.yaml \
88+
dist/install-observability.yaml

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
result
66
result-*
77

8-
# generic
8+
# distribution files are added to github releases
99
dist/
1010

1111
# Go

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,13 @@ docker-buildx: ## Build and push docker image for cross-platform support
298298
- $(CONTAINER_TOOL) buildx rm multigres-operator-builder
299299

300300
.PHONY: build-installer
301-
build-installer: manifests generate kustomize ## Generate a consolidated YAML with CRDs and deployment.
301+
build-installer: manifests generate kustomize ## Generate consolidated install YAMLs under dist/.
302302
mkdir -p dist
303303
# kustomize has no build-time image override, so we mutate then restore.
304304
cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG}
305305
$(KUSTOMIZE) build config/default > dist/install.yaml
306+
$(KUSTOMIZE) build config/deploy-certmanager > dist/install-certmanager.yaml
307+
$(KUSTOMIZE) build config/deploy-observability > dist/install-observability.yaml
306308
@git checkout -- config/manager/kustomization.yaml 2>/dev/null || true
307309

308310
##@ Test

README.md

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,62 @@ The **[Multigres](https://github.com/multigres/multigres) Operator** is a Kubern
1616

1717
### Prerequisites
1818
- Kubernetes v1.25+
19-
- `cert-manager` (Optional, if using external certificate management)
2019

2120
### Quick Start
22-
To install the operator with default settings:
21+
22+
Install the operator with built-in self-signed certificate management:
2323

2424
```bash
25-
# Install CRDs
26-
make install
25+
kubectl apply --server-side -f \
26+
https://github.com/numtide/multigres-operator/releases/latest/download/install.yaml
27+
```
28+
29+
This deploys the operator into the `multigres-operator` namespace with:
30+
- All CRDs (MultigresCluster, Cell, Shard, TableGroup, TopoServer, and templates)
31+
- RBAC roles and bindings
32+
- Mutating and Validating webhooks with self-signed certificates (auto-rotated)
33+
- The operator Deployment
34+
- Metrics endpoint
35+
36+
### With cert-manager
37+
38+
If you prefer external certificate management via [cert-manager](https://cert-manager.io/):
2739

28-
# Deploy Operator to the cluster (uses your current kubeconfig context)
29-
make deploy
40+
```bash
41+
# 1. Install cert-manager (if not already present)
42+
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.17.2/cert-manager.yaml
43+
kubectl wait --for=condition=Available deployment --all -n cert-manager --timeout=120s
44+
45+
# 2. Install the operator
46+
kubectl apply --server-side -f \
47+
https://github.com/numtide/multigres-operator/releases/latest/download/install-certmanager.yaml
3048
```
3149

32-
#### Local Development (Kind)
33-
For local testing using Kind, we provide several helper commands:
50+
### With observability stack
3451

35-
| Command | Description |
36-
| :--- | :--- |
37-
| `make kind-deploy` | Deploy operator to local Kind cluster using self-signed certs (Default). |
38-
| `make kind-deploy-certmanager` | Deploy operator to Kind, installing `cert-manager` for certificate handling. |
39-
| `make kind-deploy-no-webhook` | Deploy operator to Kind with the webhook fully disabled. |
40-
| `make kind-deploy-observability` | Deploy operator with full observability stack (Prometheus Operator, OTel Collector, Tempo, Grafana). |
41-
| `make kind-portforward` | Port-forward Grafana (3000), Prometheus (9090), Tempo (3200) to localhost. Re-run if connection drops. |
52+
Install the operator alongside Prometheus, OpenTelemetry Collector, Tempo, and Grafana for metrics, tracing, and dashboards:
53+
54+
```bash
55+
# 1. Install the Prometheus Operator (if not already present)
56+
kubectl apply --server-side -f \
57+
https://github.com/prometheus-operator/prometheus-operator/releases/download/v0.80.0/bundle.yaml
58+
kubectl wait --for=condition=Available deployment/prometheus-operator -n default --timeout=120s
59+
60+
# 2. Install the operator with observability
61+
kubectl apply --server-side -f \
62+
https://github.com/numtide/multigres-operator/releases/latest/download/install-observability.yaml
63+
```
4264

43-
### Using Sample Configurations
44-
We provide a set of samples to get you started quickly:
65+
> [!NOTE]
66+
> The bundled Prometheus, Tempo, Grafana, and OTel Collector are single-replica deployments with sane defaults intended for **evaluation and development**. They do not include HA, persistent storage, or authentication. For production observability, integrate the operator's metrics and traces with your existing monitoring infrastructure.
67+
68+
### Applying samples
69+
70+
Once the operator is running, try a sample cluster:
71+
72+
```bash
73+
kubectl apply -f https://raw.githubusercontent.com/numtide/multigres-operator/main/config/samples/minimal.yaml
74+
```
4575

4676
| Sample | Description |
4777
| :--- | :--- |
@@ -53,10 +83,17 @@ We provide a set of samples to get you started quickly:
5383
| `config/samples/no-templates.yaml` | A verbose example where all configuration is defined inline. |
5484
| `config/samples/external-etcd.yaml` | Connecting to an existing external Etcd cluster. |
5585

56-
To apply a sample:
57-
```bash
58-
kubectl apply -f config/samples/minimal.yaml
59-
```
86+
### Local Development (Kind)
87+
88+
For local testing using Kind, we provide several helper commands:
89+
90+
| Command | Description |
91+
| :--- | :--- |
92+
| `make kind-deploy` | Deploy operator to local Kind cluster using self-signed certs (Default). |
93+
| `make kind-deploy-certmanager` | Deploy operator to Kind, installing `cert-manager` for certificate handling. |
94+
| `make kind-deploy-no-webhook` | Deploy operator to Kind with the webhook fully disabled. |
95+
| `make kind-deploy-observability` | Deploy operator with full observability stack (Prometheus Operator, OTel Collector, Tempo, Grafana). |
96+
| `make kind-portforward` | Port-forward Grafana (3000), Prometheus (9090), Tempo (3200) to localhost. Re-run if connection drops. |
6097

6198
---
6299

0 commit comments

Comments
 (0)