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 diff --git a/charts/quay/Chart.yaml b/charts/quay/Chart.yaml new file mode 100644 index 00000000..6855498b --- /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 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..c890b213 --- /dev/null +++ b/charts/quay/values.yaml @@ -0,0 +1,29 @@ +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