From 465f8449990029427b8c94f095f1dec49dbee57a Mon Sep 17 00:00:00 2001 From: Johanne TROTIN Date: Sun, 30 Mar 2025 17:35:47 +0200 Subject: [PATCH] =?UTF-8?q?T=C3=A9l=C3=A9verser=20les=20fichiers=20vers=20?= =?UTF-8?q?"helm-chart"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helm-chart/Chart.lock | 6 +++ helm-chart/Chart.yaml | 17 +++++++ helm-chart/sa-token.yaml | 39 ++++++++++++++++ helm-chart/values.yaml | 99 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+) create mode 100644 helm-chart/Chart.lock create mode 100644 helm-chart/Chart.yaml create mode 100644 helm-chart/sa-token.yaml create mode 100644 helm-chart/values.yaml diff --git a/helm-chart/Chart.lock b/helm-chart/Chart.lock new file mode 100644 index 0000000..5bc833f --- /dev/null +++ b/helm-chart/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: postgresql + repository: https://charts.bitnami.com/bitnami + version: 13.2.2 +digest: sha256:7d2611e423ca9850c7a92d3ca4e200be9602d8beb6b0f7c49023b39fc03652bc +generated: "2024-01-11T14:15:33.5910163+01:00" diff --git a/helm-chart/Chart.yaml b/helm-chart/Chart.yaml new file mode 100644 index 0000000..cb32311 --- /dev/null +++ b/helm-chart/Chart.yaml @@ -0,0 +1,17 @@ +apiVersion: v2 +name: cours-nunez +description: A Helm chart for Kubernetes +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "1.0.0" +dependencies: + - name: postgresql + version: 13.2.2 + repository: https://charts.bitnami.com/bitnami diff --git a/helm-chart/sa-token.yaml b/helm-chart/sa-token.yaml new file mode 100644 index 0000000..3a67fc1 --- /dev/null +++ b/helm-chart/sa-token.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Secret +metadata: + name: default-token + namespace: labeds + annotations: + kubernetes.io/service-account.name: default +type: kubernetes.io/service-account-token +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +metadata: + name: labeds-admin + namespace: labeds + labels: + rbac.authorization.k8s.io/aggregate-to-admin: "true" + rbac.authorization.k8s.io/aggregate-to-edit: "true" +rules: +- apiGroups: [""] + resources: ["*"] + verbs: ["get", "list", "watch", "create", "update", "patch"] +--- +apiVersion: rbac.authorization.k8s.io/v1 +# This role binding allows "jane" to read pods in the "default" namespace. +# You need to already have a Role named "pod-reader" in that namespace. +kind: RoleBinding +metadata: + name: admin-rolebinding + namespace: labeds +subjects: +# You can specify more than one "subject" +- kind: ServiceAccount + name: default # "name" is case sensitive + namespace: labeds +roleRef: + # "roleRef" specifies the binding to a Role / ClusterRole + kind: Role #this must be Role or ClusterRole + name: labeds-admin # this must match the name of the Role or ClusterRole you wish to bind to + apiGroup: rbac.authorization.k8s.io \ No newline at end of file diff --git a/helm-chart/values.yaml b/helm-chart/values.yaml new file mode 100644 index 0000000..d0dd711 --- /dev/null +++ b/helm-chart/values.yaml @@ -0,0 +1,99 @@ +# Default values for helm-chart. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: code.groupe-genes.fr/labeds/cours_nunez + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: 1.3 + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 8000 + +ingress: + enabled: true + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: cours-nunez.lab.groupe-genes.fr + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + limits: + cpu: 30000m + memory: 32Gi + requests: + cpu: 500m + memory: 1024Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +otree: + admin_password: admin_mdp123 + auth_level: STUDY + production: 'false' + +postgresql: + auth: + username: otree + password: posEayU2yWKn + database: otree + primary: + persistence: + size: 50Gi + + +