From 25336d407c5927e94d5fb1d6602f3fa96a55d565 Mon Sep 17 00:00:00 2001 From: Will Parker Date: Fri, 22 Dec 2023 12:07:20 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=A6=86=20Add=20quay=20helm=20chart=20?= =?UTF-8?q?=F0=9F=A6=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/quay/Chart.yaml | 9 +++ charts/quay/README.md | 55 +++++++++++++++++++ charts/quay/templates/ns-quay-enterprise.yaml | 14 +++++ charts/quay/templates/quay-registry.yaml | 12 ++++ .../secret-quay-registry-config-bundle.yaml | 12 ++++ charts/quay/values.yaml | 30 ++++++++++ 6 files changed, 132 insertions(+) create mode 100644 charts/quay/Chart.yaml create mode 100644 charts/quay/README.md create mode 100644 charts/quay/templates/ns-quay-enterprise.yaml create mode 100644 charts/quay/templates/quay-registry.yaml create mode 100644 charts/quay/templates/secret-quay-registry-config-bundle.yaml create mode 100644 charts/quay/values.yaml diff --git a/charts/quay/Chart.yaml b/charts/quay/Chart.yaml new file mode 100644 index 00000000..8156f941 --- /dev/null +++ b/charts/quay/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v2 +name: quay +description: Create quay registry +type: application +version: 0.0.1 +icon: https://avatars1.githubusercontent.com/u/68044996?s=200&v=4 +maintainers: + - name: willsparker + - name: ckavili \ No newline at end of file diff --git a/charts/quay/README.md b/charts/quay/README.md new file mode 100644 index 00000000..d263d736 --- /dev/null +++ b/charts/quay/README.md @@ -0,0 +1,55 @@ +# Quay + +Quay is a powerful container registry platform with many features and components, and is highly configurable. Below values would help you to store your Quay configurations easily. + +## Prereqs + +Requires Quay Operator. You can use [Operator Installer Helm Chart](https://github.com/redhat-cop/helm-charts/tree/main/charts/operators-installer) to deploy it. + +Example values: + +```yaml +operators: +- channel: stable-3.8 + installPlanApproval: Manual + name: quay-operator + source: redhat-operators + sourceNamespace: openshift-marketplace + csv: quay-operator.v3.8.12 +``` + +## Installation + +Add the redhat-cop helm chart repo: + +```bash +helm repo add redhat-cop https://redhat-cop.github.io/helm-charts +helm repo update +``` +Deploy the helm chart: + +```bash +helm install quay redhat-cop/quay +``` + +The above command deploys Quay on a cluster. Create your custom values.yaml file to include your customizations. The [configuration](#configuration) section lists the parameters that can be configured during installation. + + +```bash +helm install quay redhat-cop/quay -f your-custom-values.yaml +``` + +## Configuration +The following table lists the configurable parameters of the Quay chart and their default values. + +| Parameter | Description | +|-----------------------------|-------------------------------------------------------------------------------------| +| quay_registry_config_bundle | Components of the config bundle to include your own AD onfig, TLS/SSL certificate + key pair, etc | +| registry_components | Components and dependencies for the quay registry. Enable/disable by editing the values file.| +| infra_nodes | Togglable value to pin the Quay registry to the infra nodes. Default is false. | + +## Uninstallation + +```bash +helm uninstall quay +``` \ No newline at end of file diff --git a/charts/quay/templates/ns-quay-enterprise.yaml b/charts/quay/templates/ns-quay-enterprise.yaml new file mode 100644 index 00000000..43e83fa6 --- /dev/null +++ b/charts/quay/templates/ns-quay-enterprise.yaml @@ -0,0 +1,14 @@ + +--- +apiVersion: v1 +kind: Namespace +metadata: + name: quay-enterprise + annotations: + argocd.argoproj.io/sync-wave: "-1" + {{- if .Values.infra_nodes }} + openshift.io/node-selector: node-role.kubernetes.io/infra= + scheduler.alpha.kubernetes.io/defaultTolerations: >- + [{"operator": "Exists", "effect": "NoSchedule", "key": + "node-role.kubernetes.io/infra"}] + {{- end }} diff --git a/charts/quay/templates/quay-registry.yaml b/charts/quay/templates/quay-registry.yaml new file mode 100644 index 00000000..2330d1f3 --- /dev/null +++ b/charts/quay/templates/quay-registry.yaml @@ -0,0 +1,12 @@ +--- +apiVersion: quay.redhat.com/v1 +kind: QuayRegistry +metadata: + name: quay-registry + namespace: quay-enterprise +spec: + {{- if .Values.registry_components }} + components: + {{- .Values.registry_components | toYaml | trim | nindent 4 }} + {{- end }} + configBundleSecret: quay-registry-config-bundle diff --git a/charts/quay/templates/secret-quay-registry-config-bundle.yaml b/charts/quay/templates/secret-quay-registry-config-bundle.yaml new file mode 100644 index 00000000..6563f945 --- /dev/null +++ b/charts/quay/templates/secret-quay-registry-config-bundle.yaml @@ -0,0 +1,12 @@ +{{- if .Values.quay_registry_config_bundle }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: quay-registry-config-bundle + namespace: quay-enterprise +type: Opaque +data: + config.yaml: | + {{- .Values.quay_registry_config_bundle | toYaml | trim | nindent 4 }} +{{- end }} diff --git a/charts/quay/values.yaml b/charts/quay/values.yaml new file mode 100644 index 00000000..506cc90b --- /dev/null +++ b/charts/quay/values.yaml @@ -0,0 +1,30 @@ +infra_nodes: false + +quay_registry_config_bundle: + # REGISTRY_TITLE: My Awesome Quay + # add your configuration fields here + +registry_components: + - kind: clair + managed: true + - kind: postgres + managed: true + - kind: objectstorage + managed: true + - kind: redis + managed: true + - kind: horizontalpodautoscaler + managed: true + - kind: route + managed: true + - kind: mirror + managed: true + - kind: monitoring + managed: true + - kind: tls + managed: true + - kind: quay + managed: true + - kind: clairpostgres + managed: true + From db12ceb5242aa2a4f897e3dfa1e79cef5061aa75 Mon Sep 17 00:00:00 2001 From: Will Parker Date: Fri, 22 Dec 2023 12:17:45 +0000 Subject: [PATCH 2/5] =?UTF-8?q?=F0=9F=98=BB=20Fix=20linter=20issue=20?= =?UTF-8?q?=F0=9F=98=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/quay/Chart.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/quay/Chart.yaml b/charts/quay/Chart.yaml index 8156f941..a6f1cb4d 100644 --- a/charts/quay/Chart.yaml +++ b/charts/quay/Chart.yaml @@ -6,4 +6,5 @@ version: 0.0.1 icon: https://avatars1.githubusercontent.com/u/68044996?s=200&v=4 maintainers: - name: willsparker - - name: ckavili \ No newline at end of file + - name: ckavili + \ No newline at end of file From a2d45584f628bea51aaa5ca503d699b210d70e4b Mon Sep 17 00:00:00 2001 From: Will Parker Date: Fri, 22 Dec 2023 12:19:47 +0000 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=98=BB=20Fix=20linter=20issue=20(x2)?= =?UTF-8?q?=20=F0=9F=98=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/quay/Chart.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/quay/Chart.yaml b/charts/quay/Chart.yaml index a6f1cb4d..6855498b 100644 --- a/charts/quay/Chart.yaml +++ b/charts/quay/Chart.yaml @@ -7,4 +7,3 @@ icon: https://avatars1.githubusercontent.com/u/68044996?s=200&v=4 maintainers: - name: willsparker - name: ckavili - \ No newline at end of file From 060641b45f0f6aab039907b86a1e643ca8728cfa Mon Sep 17 00:00:00 2001 From: Will Parker Date: Fri, 22 Dec 2023 12:21:24 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=F0=9F=98=BB=20Fix=20linter=20issue=20(x3)?= =?UTF-8?q?=20=F0=9F=98=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- charts/quay/values.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/charts/quay/values.yaml b/charts/quay/values.yaml index 506cc90b..c890b213 100644 --- a/charts/quay/values.yaml +++ b/charts/quay/values.yaml @@ -27,4 +27,3 @@ registry_components: managed: true - kind: clairpostgres managed: true - From dfecc726cfeda7fb2624a02faa18929deaebb3e9 Mon Sep 17 00:00:00 2001 From: Will Parker Date: Wed, 10 Jan 2024 12:31:48 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=F0=9F=90=91=20Exclude=20quay=20chart=20fro?= =?UTF-8?q?m=20ct=20=F0=9F=90=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _test/ct-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/_test/ct-config.yaml b/_test/ct-config.yaml index d0b491d9..9fb56832 100644 --- a/_test/ct-config.yaml +++ b/_test/ct-config.yaml @@ -28,6 +28,7 @@ excluded-charts: - owncloud - pact-broker - ploigos +- quay - sonarqube - sonatype-nexus - stackrox