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

feat: 🚀 second chart to deploy ns resources #6

Merged
merged 1 commit into from
Apr 23, 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
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# CPiN Charts

## Description

Ce dépôt héberge les Helm Charts développés et maintenus par Cloud Pi Native.

Il expose également un Helm Repository sur [cloud-pi-native.github.io/helm-charts](https://cloud-pi-native.github.io/helm-charts/index.yaml) grâce à Github Pages et la Github Action [chart releaser](https://github.com/helm/chart-releaser-action).


## Utilisation

### CLI
```sh
helm repo add cpin https://cloud-pi-native.github.io/helm-charts
helm search repo dso
helm install dso-env cpin/dso-env
```

### ArgoCD

```yaml
[...]
sources:
- repoURL: https://github.com/cloud-pi-native/helm-charts.git
targetRevision: dso-env-1.0.0
path: charts/dso-env
```
2 changes: 0 additions & 2 deletions charts/dso-env/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Creates argocd Project and Applications to deploy DSO project repositories.
|-----|------|---------|-------------|
| application.destination.name | string | `""` | Nom du cluster applicatif cible |
| application.destination.namespace | string | `"app1"` | Nom du namespace applicatif cible |
| application.quota.cpu | int | `nil` | Quota CPU pour le namespace |
| application.quota.memory | string | `nil` | Quota mémoire pour le namespace |
| application.repositories | list | `[{"path":".","repoURL":"https://gitlab.com/projects/org/demo/quota-explorer.git","targetRevision":"main"}]` | Liste des dépôts à déployer |
| application.sourceReposPrefix | string | `"https://gitlab.com/projects/org/demo"` | Préfixe des dépôts autorisés |
| argocd.namespace | string | `"argocd"` | Namespace de création des objets ArgoCD |
Expand Down
5 changes: 0 additions & 5 deletions charts/dso-env/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ environment:
application:
# -- Préfixe des dépôts autorisés
sourceReposPrefix: https://gitlab.com/projects/org/demo
quota:
# -- (int) Quota CPU pour le namespace
cpu:
# -- Quota mémoire pour le namespace
memory:
destination:
# -- Nom du cluster applicatif cible
name: ""
Expand Down
5 changes: 5 additions & 0 deletions charts/dso-ns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v2
name: dso-ns
description: A Helm chart to create all the necessary resources for deploying applications by the DSO console (namespace, secrets, quota, ...).
version: 1.0.0
appVersion: 1.0.0
17 changes: 17 additions & 0 deletions charts/dso-ns/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# dso-ns

![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)

A Helm chart to create all the necessary resources for deploying applications by the DSO console (namespace, secrets, quota, ...).

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| application.destination.namespace | string | `"app1"` | Nom du namespace applicatif cible |
| application.quota.cpu | int | `nil` | Quota CPU pour le namespace |
| application.quota.memory | string | `nil` | Quota mémoire pour le namespace |
| commonLabels | object | `{}` | Labels appliqués sur les différents objets |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.13.1](https://github.com/norwoodj/helm-docs/releases/v1.13.1)
7 changes: 7 additions & 0 deletions charts/dso-ns/templates/ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: {{ .Values.application.destination.namespace }}
labels:
app.kubernetes.io/managed-by: dso-console
{{- .Values.commonLabels | toYaml | nindent 4 }}
15 changes: 15 additions & 0 deletions charts/dso-ns/templates/quota.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: ResourceQuota
metadata:
name: dso-quota
namespace: {{ .Values.application.destination.namespace }}
labels:
app.kubernetes.io/managed-by: dso-console
{{- .Values.commonLabels | toYaml | nindent 4 }}
spec:
hard:
limits.cpu: {{ .Values.application.quota.cpu | quote }}
limits.memory: {{ .Values.application.quota.memory }}
requests.cpu: {{ .Values.application.quota.cpu | quote }}
requests.memory: {{ .Values.application.quota.memory }}

12 changes: 12 additions & 0 deletions charts/dso-ns/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# -- Labels appliqués sur les différents objets
commonLabels: {}
application:
destination:
# -- Nom du namespace applicatif cible
namespace: app1
quota:
# -- (int) Quota CPU pour le namespace
cpu:
# -- Quota mémoire pour le namespace
memory:

Loading