Skip to content

Commit 32c4806

Browse files
authored
Merge pull request #309 from slauger/develop
Release v0.4.0 (minor)
2 parents e7a5507 + 3aecaa1 commit 32c4806

20 files changed

Lines changed: 1344 additions & 113 deletions

File tree

api/v1alpha1/certificate_types.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,25 @@ type CertificateSpec struct {
6969
// CSRExtensions defines Puppet CSR extension attributes to embed in the CSR.
7070
// +optional
7171
CSRExtensions *CSRExtensionsSpec `json:"csrExtensions,omitempty"`
72+
73+
// RenewBefore is the duration before expiration when the certificate should be renewed.
74+
// Uses duration format: "60d", "30d", "720h".
75+
// +kubebuilder:default="60d"
76+
// +kubebuilder:validation:Pattern=`^\d+[smhdy]$`
77+
// +optional
78+
RenewBefore string `json:"renewBefore,omitempty"`
7279
}
7380

7481
// CertificatePhase represents the current lifecycle phase of a Certificate.
75-
// +kubebuilder:validation:Enum=Pending;Requesting;WaitingForSigning;Signed;Error
82+
// +kubebuilder:validation:Enum=Pending;Requesting;WaitingForSigning;Signed;Renewing;Error
7683
type CertificatePhase string
7784

7885
const (
7986
CertificatePhasePending CertificatePhase = "Pending"
8087
CertificatePhaseRequesting CertificatePhase = "Requesting"
8188
CertificatePhaseWaitingForSigning CertificatePhase = "WaitingForSigning"
8289
CertificatePhaseSigned CertificatePhase = "Signed"
90+
CertificatePhaseRenewing CertificatePhase = "Renewing"
8391
CertificatePhaseError CertificatePhase = "Error"
8492
)
8593

charts/openvox-operator/crds/openvox.voxpupuli.org_certificates.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ spec:
9595
items:
9696
type: string
9797
type: array
98+
renewBefore:
99+
default: 60d
100+
description: |-
101+
RenewBefore is the duration before expiration when the certificate should be renewed.
102+
Uses duration format: "60d", "30d", "720h".
103+
pattern: ^\d+[smhdy]$
104+
type: string
98105
required:
99106
- authorityRef
100107
type: object
@@ -169,6 +176,7 @@ spec:
169176
- Requesting
170177
- WaitingForSigning
171178
- Signed
179+
- Renewing
172180
- Error
173181
type: string
174182
secretName:

config/crd/bases/openvox.voxpupuli.org_certificates.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ spec:
9595
items:
9696
type: string
9797
type: array
98+
renewBefore:
99+
default: 60d
100+
description: |-
101+
RenewBefore is the duration before expiration when the certificate should be renewed.
102+
Uses duration format: "60d", "30d", "720h".
103+
pattern: ^\d+[smhdy]$
104+
type: string
98105
required:
99106
- authorityRef
100107
type: object
@@ -169,6 +176,7 @@ spec:
169176
- Requesting
170177
- WaitingForSigning
171178
- Signed
179+
- Renewing
172180
- Error
173181
type: string
174182
secretName:

docs/guides/ca-import.md

Lines changed: 16 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# Importing or Connecting an External CA
22

3-
This guide covers two approaches for using an existing Puppet or OpenVox CA with the operator:
4-
5-
1. **CA Import** -- copy existing CA data into the operator-managed PVC (one-time migration)
6-
2. **External CA** -- point the operator at a running CA outside the cluster (ongoing delegation)
7-
8-
## Option A: CA Import (One-Time Migration)
3+
## CA Import (One-Time Migration)
94

105
If you have an existing CA and want the operator to manage it going forward, you can import the CA data into the operator's PVC.
116

@@ -68,7 +63,7 @@ If you have an existing CA and want the operator to manage it going forward, you
6863

6964
3. The CA setup Job will detect existing data and skip regeneration. The operator will create the corresponding Secrets and transition to `Ready`.
7065

71-
## Option B: External CA (Ongoing Delegation)
66+
## External CA (Ongoing Delegation)
7267

7368
If you have a Puppet/OpenVox CA running outside the cluster and want to keep using it, configure `spec.external` on the `CertificateAuthority` resource. The operator will delegate CSR signing and CRL fetching to the external CA URL.
7469

@@ -78,14 +73,20 @@ If you have a Puppet/OpenVox CA running outside the cluster and want to keep usi
7873
- The CA's public certificate (`ca_crt.pem`)
7974
- (Optional) A client certificate and key for mTLS authentication
8075

76+
!!! tip "Using an existing Puppet CA"
77+
On a traditional Puppet CA server, the CA certificate is typically located at `/etc/puppetlabs/puppet/ssl/certs/ca.pem`. You can copy it with:
78+
```bash
79+
scp puppet-ca.example.com:/etc/puppetlabs/puppet/ssl/certs/ca.pem ca_crt.pem
80+
```
81+
8182
### Steps
8283

8384
1. Create Secrets with the CA certificate and optional client credentials:
8485

8586
```bash
8687
# CA certificate for TLS verification
8788
kubectl create secret generic external-ca-cert \
88-
--from-file=ca_crt.pem=/path/to/ca_crt.pem
89+
--from-file=ca_crt.pem=ca_crt.pem
8990
9091
# (Optional) Client certificate for mTLS
9192
kubectl create secret generic external-ca-tls \
@@ -118,6 +119,13 @@ If you have a Puppet/OpenVox CA running outside the cluster and want to keep usi
118119
- Periodically fetch the CRL from the external CA
119120
- Route CSR signing requests to the external CA
120121

122+
4. Verify the CA transitions to `External` phase:
123+
124+
```bash
125+
kubectl get ca external-ca -o jsonpath='{.status.phase}'
126+
# Expected: External
127+
```
128+
121129
### External CA Fields
122130

123131
| Field | Required | Description |
@@ -187,60 +195,3 @@ In a multi-cluster or multi-namespace setup you can run one openvox-stack as the
187195
```
188196

189197
5. The secondary stack will now delegate all CSR signing and CRL fetching to the primary CA.
190-
191-
## Using an Existing Puppet CA as External CA
192-
193-
If you already run a traditional Puppet CA (on a VM or bare-metal server) and want to manage Puppet agents via the operator without migrating the CA, you can point the operator at the existing CA.
194-
195-
### Prerequisites
196-
197-
- The Puppet CA server is accessible from the Kubernetes cluster (e.g. `https://puppet-ca.example.com:8140`)
198-
- You have access to the CA certificate file (typically `/etc/puppetlabs/puppet/ssl/certs/ca.pem` on the Puppet CA server)
199-
- (Optional) A signed client certificate and key for mTLS if the CA requires client authentication
200-
201-
### Steps
202-
203-
1. Copy the CA certificate from the Puppet CA server:
204-
205-
```bash
206-
scp puppet-ca.example.com:/etc/puppetlabs/puppet/ssl/certs/ca.pem ca_crt.pem
207-
```
208-
209-
2. Create the Kubernetes Secrets:
210-
211-
```bash
212-
# CA certificate for TLS verification
213-
kubectl create secret generic puppet-ca-cert \
214-
--from-file=ca_crt.pem=ca_crt.pem
215-
216-
# (Optional) Client certificate for mTLS
217-
# Use a signed certificate from the existing Puppet CA
218-
kubectl create secret generic puppet-ca-tls \
219-
--from-file=tls.crt=/path/to/client.pem \
220-
--from-file=tls.key=/path/to/client-key.pem
221-
```
222-
223-
3. Create the `CertificateAuthority` resource:
224-
225-
```yaml
226-
apiVersion: openvox.voxpupuli.org/v1alpha1
227-
kind: CertificateAuthority
228-
metadata:
229-
name: puppet-ca
230-
spec:
231-
allowSubjectAltNames: true
232-
allowAuthorizationExtensions: true
233-
enableInfraCRL: true
234-
crlRefreshInterval: 5m
235-
external:
236-
url: https://puppet-ca.example.com:8140
237-
caSecretRef: puppet-ca-cert
238-
tlsSecretRef: puppet-ca-tls
239-
```
240-
241-
4. Verify the CA transitions to `External` phase:
242-
243-
```bash
244-
kubectl get ca puppet-ca -o jsonpath='{.status.phase}'
245-
# Expected: External
246-
```

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ require (
77
k8s.io/api v0.35.4
88
k8s.io/apimachinery v0.35.4
99
k8s.io/client-go v0.35.4
10+
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5
1011
sigs.k8s.io/controller-runtime v0.23.3
1112
sigs.k8s.io/gateway-api v1.5.1
1213
)
@@ -96,7 +97,6 @@ require (
9697
k8s.io/gengo/v2 v2.0.0-20250922181213-ec3ebc5fd46b // indirect
9798
k8s.io/klog/v2 v2.140.0 // indirect
9899
k8s.io/kube-openapi v0.0.0-20260304202019-5b3e3fdb0acf // indirect
99-
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 // indirect
100100
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 // indirect
101101
sigs.k8s.io/controller-tools v0.20.1 // indirect
102102
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc=
263263
k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0=
264264
k8s.io/kube-openapi v0.0.0-20260304202019-5b3e3fdb0acf h1:btPscg4cMql0XdYK2jLsJcNEKmACJz8l+U7geC06FiM=
265265
k8s.io/kube-openapi v0.0.0-20260304202019-5b3e3fdb0acf/go.mod h1:kdmbQkyfwUagLfXIad1y2TdrjPFWp2Q89B3qkRwf/pQ=
266-
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2 h1:AZYQSJemyQB5eRxqcPky+/7EdBj0xi3g0ZcxxJ7vbWU=
267-
k8s.io/utils v0.0.0-20260210185600-b8788abfbbc2/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
266+
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5 h1:kBawHLSnx/mYHmRnNUf9d4CpjREbeZuxoSGOX/J+aYM=
267+
k8s.io/utils v0.0.0-20260319190234-28399d86e0b5/go.mod h1:xDxuJ0whA3d0I4mf/C4ppKHxXynQ+fxnkmQH0vTHnuk=
268268
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0 h1:hSfpvjjTQXQY2Fol2CS0QHMNs/WI1MOSGzCm1KhM5ec=
269269
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.34.0/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw=
270270
sigs.k8s.io/controller-runtime v0.23.3 h1:VjB/vhoPoA9l1kEKZHBMnQF33tdCLQKJtydy4iqwZ80=

images/openvox-agent/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# renovate: datasource=github-releases depName=OpenVoxProject/openvox versioning=loose
1010
ARG OPENVOX_AGENT_VERSION=8.25.0
1111

12-
FROM registry.access.redhat.com/ubi9/ubi:9.7-1776315208
12+
FROM registry.access.redhat.com/ubi9/ubi:9.7-1776645994
1313

1414
ARG OPENVOX_AGENT_VERSION
1515

images/openvox-db/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ARG OPENVOXDB_VERSION=8.12.1
1414
################################################################################
1515
# Stage: base — JRE + minimal runtime deps
1616
################################################################################
17-
FROM registry.access.redhat.com/ubi9/ubi:9.7-1776315208 AS base
17+
FROM registry.access.redhat.com/ubi9/ubi:9.7-1776645994 AS base
1818

1919
ARG JDK_VERSION=17
2020

images/openvox-e2e-code/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# podman build -t openvox-e2e-code:latest -f images/openvox-e2e-code/Containerfile .
99

1010
# Stage 1: Install modules with r10k
11-
FROM registry.access.redhat.com/ubi9/ubi:9.7-1776315208 AS builder
11+
FROM registry.access.redhat.com/ubi9/ubi:9.7-1776645994 AS builder
1212

1313
RUN dnf module enable ruby:3.3 -y \
1414
&& dnf install -y --setopt=install_weak_deps=False ruby ruby-devel rubygem-bundler git gcc make redhat-rpm-config libffi-devel \

images/openvox-mock/Containerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN go mod download
1111
COPY cmd/mock/ cmd/mock/
1212
RUN CGO_ENABLED=0 go build -o /openvox-mock ./cmd/mock/
1313

14-
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1776104705
14+
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.7-1776645941
1515

1616
LABEL org.opencontainers.image.title="OpenVox Mock" \
1717
org.opencontainers.image.description="Mock ENC/Report/OpenVox DB receiver for E2E tests" \

0 commit comments

Comments
 (0)