Skip to content

Commit

Permalink
Add ResourceGroup CRD to OLM manifests
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <[email protected]>
  • Loading branch information
stefanprodan committed Oct 31, 2024
1 parent 023b4f1 commit d1bd480
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,74 @@ metadata:
"status": "Applied revision: refs/heads/main@sha1:a90cd1ac35de01c175f7199315d3f4cd60195911"
}
}
},
{
"apiVersion": "fluxcd.controlplane.io/v1",
"kind": "ResourceGroup",
"metadata": {
"name": "podinfo",
"namespace": "default",
"annotations": {
"fluxcd.controlplane.io/reconcile": "enabled",
"fluxcd.controlplane.io/reconcileEvery": "30m",
"fluxcd.controlplane.io/reconcileTimeout": "5m"
}
},
"spec": {
"commonMetadata": {
"labels": {
"app.kubernetes.io/name": "podinfo"
}
},
"inputs": [
{
"tenant": "team1",
"version": "6.7.x",
"replicas": "2"
},
{
"tenant": "team2",
"version": "6.6.x",
"replicas": "3"
}
],
"resources": [
{
"apiVersion": "source.toolkit.fluxcd.io/v1beta2",
"kind": "OCIRepository",
"metadata": {
"name": "podinfo-<< inputs.tenant >>",
"namespace": "default"
},
"spec": {
"interval": "10m",
"url": "oci://ghcr.io/stefanprodan/charts/podinfo",
"ref": {
"semver": "<< inputs.version | quote >>"
}
}
},
{
"apiVersion": "helm.toolkit.fluxcd.io/v2",
"kind": "HelmRelease",
"metadata": {
"name": "podinfo-<< inputs.tenant >>",
"namespace": "default"
},
"spec": {
"interval": "1h",
"releaseName": "podinfo-<< inputs.tenant >>",
"chartRef": {
"kind": "OCIRepository",
"name": "podinfo-<< inputs.tenant >>"
},
"values": {
"replicaCount": "<< inputs.replicas | int >>"
}
}
}
]
}
}
]
categories: Integration & Delivery
Expand Down Expand Up @@ -190,6 +258,11 @@ spec:
kind: FluxReport
version: v1
description: Flux Report (Autogenerated)
- name: resourcegroups.fluxcd.controlplane.io
displayName: ResourceGroup
kind: ResourceGroup
version: v1
description: Resource Group
install:
strategy: deployment
spec:
Expand Down
Empty file.
3 changes: 3 additions & 0 deletions hack/build-olm-manifests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,8 @@ ${DEST_DIR}/bundle/manifests/fluxinstances.fluxcd.controlplane.io.crd.yaml
cat ${REPOSITORY_ROOT}/config/crd/bases/fluxcd.controlplane.io_fluxreports.yaml > \
${DEST_DIR}/bundle/manifests/fluxreports.fluxcd.controlplane.io.crd.yaml

cat ${REPOSITORY_ROOT}/config/crd/bases/fluxcd.controlplane.io_resourcegroups.yaml > \
${DEST_DIR}/bundle/manifests/resourcegroups.fluxcd.controlplane.io.crd.yaml

mv ${DEST_DIR}/bundle ${DEST_DIR}/${VERSION}
info "OperatorHub bundle created in ${DEST_DIR}/${VERSION}"

0 comments on commit d1bd480

Please sign in to comment.