Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🦆 Add quay helm chart 🦆 #415

Merged
merged 5 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _test/ct-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ excluded-charts:
- owncloud
- pact-broker
- ploigos
- quay
- sonarqube
- sonatype-nexus
- stackrox
Expand Down
9 changes: 9 additions & 0 deletions charts/quay/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
55 changes: 55 additions & 0 deletions charts/quay/README.md
Original file line number Diff line number Diff line change
@@ -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
```
14 changes: 14 additions & 0 deletions charts/quay/templates/ns-quay-enterprise.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
12 changes: 12 additions & 0 deletions charts/quay/templates/quay-registry.yaml
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions charts/quay/templates/secret-quay-registry-config-bundle.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
29 changes: 29 additions & 0 deletions charts/quay/values.yaml
Original file line number Diff line number Diff line change
@@ -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