diff --git a/incubator/gitea/.helmignore b/incubator/gitea/.helmignore new file mode 100644 index 000000000000..f0c131944441 --- /dev/null +++ b/incubator/gitea/.helmignore @@ -0,0 +1,21 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj diff --git a/incubator/gitea/Chart.yaml b/incubator/gitea/Chart.yaml new file mode 100644 index 000000000000..4520b469a27c --- /dev/null +++ b/incubator/gitea/Chart.yaml @@ -0,0 +1,9 @@ +apiVersion: v1 +appVersion: 1.4.2 +description: Git with a cup of tea, painless self-hosted git service +home: https://gitea.io +keywords: +- git +- gitea +name: gitea +version: 0.1.0 diff --git a/incubator/gitea/README.md b/incubator/gitea/README.md new file mode 100644 index 000000000000..af0174662ac1 --- /dev/null +++ b/incubator/gitea/README.md @@ -0,0 +1,72 @@ +# Gitea Helm Chart + +[Gitea][] is a painless self-hosted Git service. + +## TL;DR; + +```console +$ helm install incubator/gitea +``` + +## Introduction + +This chart bootstraps a [Gitea][] deployment on a [Kubernetes][] cluster using +the [Helm][] package manager. + +## Prerequisites Details + +* PV support on underlying infrastructure (if persistence is required) + +## Installing the Chart + +To install the chart with the release name `my-release`: + +```console +$ helm install --name my-release incubator/gitea +``` + +## Uninstalling the Chart + +To uninstall/delete the `my-release` deployment: + +```console +$ helm delete my-release +``` + +The command removes nearly all the Kubernetes components associated with the +chart and deletes the release. + +## Configuration + +The following table lists some of the configurable parameters of the Gitea +chart and their default values. + +| Parameter | Description | Default | +| ----------------------- | ---------------------------------- | ---------------------------------------------------------- | +| `imageRepository` | Gitea image | `gitea/gitea` | +| `imageTag` | Gitea image version | `1.4.2` | +| `imagePullPolicy` | Gitea image pull policy | `Always` if `imageTag` is `latest`, else `IfNotPresent` | +| `postgresql.install` | Weather or not to install PostgreSQL dependency | `true` | +| `postgresql.postgresHost` | PostgreSQL host (if `postgresql.install == false`) | `nil` | +| `postgresql.postgresUser` | PostgreSQL User to create | `gitea` | +| `postgresql.postgresPassword` | PostgreSQL Password for the new user | `gitea` | +| `postgresql.postgresDatabase` | PostgreSQL Database to create | `gitea` | +| `postgresql.persistence.enabled` | Enable PostgreSQL persistence using Persistent Volume Claims | `true` | + +See [values.yaml](values.yaml) for a more complete list, and links to the Gitea documentation. + +Specify each parameter using the `--set key=value[,key=value]` argument to +`helm install`. + +Alternatively, a YAML file that specifies the values for the parameters can be +provided while installing the chart. For example, + +```console +$ helm install --name my-release -f values.yaml incubator/gitea +``` + +> **Tip**: You can use the default [values.yaml](values.yaml) + +[Gitea]: https://github.com/go-gitea/gitea +[Kubernetes]: https://kubernetes.io +[Helm]: https://helm.sh diff --git a/incubator/gitea/requirements.yaml b/incubator/gitea/requirements.yaml new file mode 100644 index 000000000000..e1b59966d72a --- /dev/null +++ b/incubator/gitea/requirements.yaml @@ -0,0 +1,7 @@ +dependencies: + - name: postgresql + version: 0.6.0 + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: postgresql.install + tags: + - postgresql diff --git a/incubator/gitea/templates/NOTES.txt b/incubator/gitea/templates/NOTES.txt new file mode 100644 index 000000000000..2ca1bcbd00b8 --- /dev/null +++ b/incubator/gitea/templates/NOTES.txt @@ -0,0 +1,23 @@ +1. Get the Gitea URL by running: + +{{- if contains "NodePort" .Values.serviceType }} + + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "gitea.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT/ + +{{- else if contains "LoadBalancer" .Values.serviceType }} + + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "gitea.fullname" . }}' + + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "gitea.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP/ +{{- else if contains "ClusterIP" .Values.serviceType }} + + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "gitea.fullname" . }}" -o jsonpath="{.items[0].metadata.name}") + echo http://127.0.0.1:8080/ + kubectl port-forward $POD_NAME 8080:80 +{{- end }} + +2. Register a user. The first user registered will be the administrator. diff --git a/incubator/gitea/templates/_helpers.tpl b/incubator/gitea/templates/_helpers.tpl new file mode 100644 index 000000000000..407d2e65a7b7 --- /dev/null +++ b/incubator/gitea/templates/_helpers.tpl @@ -0,0 +1,78 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "gitea.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "gitea.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create a default fully qualified postgresql name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "gitea.postgresql.fullname" -}} +{{- $name := default "postgresql" .Values.postgresql.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Determine database user based on use of postgresql dependency. +*/}} +{{- define "gitea.database.host" -}} +{{- if .Values.postgresql.install -}} +{{- template "gitea.postgresql.fullname" . -}} +{{- else -}} +{{- .Values.service.gitea.databaseHost | quote -}} +{{- end -}} +{{- end -}} + +{{/* +Determine database user based on use of postgresql dependency. +*/}} +{{- define "gitea.database.user" -}} +{{- if .Values.postgresql.install -}} +{{- .Values.postgresql.postgresUser | quote -}} +{{- else -}} +{{- .Values.service.gitea.databaseUser | quote -}} +{{- end -}} +{{- end -}} + +{{/* +Determine database password based on use of postgresql dependency. +*/}} +{{- define "gitea.database.password" -}} +{{- if .Values.postgresql.install -}} +{{- .Values.postgresql.postgresPassword | quote -}} +{{- else -}} +{{- .Values.service.gitea.databasePassword | quote -}} +{{- end -}} +{{- end -}} + +{{/* +Determine database name based on use of postgresql dependency. +*/}} +{{- define "gitea.database.name" -}} +{{- if .Values.postgresql.install -}} +{{- .Values.postgresql.postgresDatabase | quote -}} +{{- else -}} +{{- .Values.service.gitea.databaseName | quote -}} +{{- end -}} +{{- end -}} diff --git a/incubator/gitea/templates/configmap-tcp.yaml b/incubator/gitea/templates/configmap-tcp.yaml new file mode 100644 index 000000000000..079e3463bc02 --- /dev/null +++ b/incubator/gitea/templates/configmap-tcp.yaml @@ -0,0 +1,13 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + labels: + app: {{ template "gitea.fullname" . }}-tcp + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + component: {{ default "gitea" .Values.service.nameOverride }} + heritage: "{{ .Release.Service }}" + release: "{{ .Release.Name }}" + name: tcp-{{ template "gitea.fullname" . }}-ssh +data: + 2222: default/{{ template "gitea.fullname" . }}:ssh + diff --git a/incubator/gitea/templates/configmap.yaml b/incubator/gitea/templates/configmap.yaml new file mode 100644 index 000000000000..a147fae580e1 --- /dev/null +++ b/incubator/gitea/templates/configmap.yaml @@ -0,0 +1,80 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + labels: + app: {{ template "gitea.fullname" . }}-config + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + component: {{ default "gitea" .Values.service.nameOverride }} + heritage: {{ .Release.Service }} + release: {{ .Release.Name }} + name: {{ template "gitea.fullname" . }}-config +data: + app.ini: |- + APP_NAME = {{ .Values.service.gitea.appName }} + RUN_MODE = {{ .Values.service.gitea.runMode }} + + [repository.upload] + ENABLED = {{ .Values.service.gitea.repositoryUploadEnabled }} + ALLOWED_TYPES = {{ .Values.service.gitea.repositoryUploadAllowedTypes }} + MAX_FILE_SIZE = {{ .Values.service.gitea.repositoryUploadMaxFileSize }} + MAX_FILES = {{ .Values.service.gitea.repositoryUploadMaxFiles }} + + [server] + PROTOCOL = http + DOMAIN = {{ .Values.service.gitea.serverDomain }} + ROOT_URL = {{ .Values.service.gitea.serverRootUrl }} + LANDING_PAGE = {{ .Values.service.gitea.serverLandingPage }} + SSH_DOMAIN = {{ default .Values.service.gitea.serverDomain .Values.service.sshDomain }} + SSH_PORT = {{ .Values.service.sshPort }} + SSH_LISTEN_PORT = {{ .Values.service.sshPort }} + + [service] + ENABLE_CAPTCHA = {{ .Values.service.gitea.serviceEnableCaptcha }} + ACTIVE_CODE_LIVE_MINUTES = 180 + RESET_PASSWD_CODE_LIVE_MINUTES = 180 + REGISTER_EMAIL_CONFIRM = {{ .Values.service.gitea.serviceRegisterEmailConfirm }} + DISABLE_REGISTRATION = {{ .Values.service.gitea.serviceDisableRegistration }} + REQUIRE_SIGNIN_VIEW = {{ .Values.service.gitea.serviceRequireSignInView }} + ENABLE_NOTIFY_MAIL = {{ .Values.service.gitea.serviceEnableNotifyMail }} + ENABLE_REVERSE_PROXY_AUTHENTICATION = false + ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false + + [database] + DB_TYPE = {{ .Values.service.gitea.databaseType | quote }} + HOST = {{ template "gitea.database.host" . }} + NAME = {{ template "gitea.database.name" . }} + USER = {{ template "gitea.database.user" . }} + PASSWD = {{ template "gitea.database.password" . }} + PATH = {{ .Values.service.gitea.databasePath | quote }} + + [security] + INSTALL_LOCK = true + SECRET_KEY = {{ default "" .Values.service.gitea.securitySecretKey | b64enc | quote }} + + [ui] + EXPLORE_PAGING_NUM = {{ .Values.service.gitea.uiExplorePagingNum }} + ISSUE_PAGING_NUM = {{ .Values.service.gitea.uiIssuePagingNum }} + FEED_MAX_COMMIT_NUM = {{ .Values.service.gitea.uiFeedMaxCommitNum }} + + [cache] + ADAPTER = {{ .Values.service.gitea.cacheAdapter }} + INTERVAL = {{ .Values.service.gitea.cacheInterval }} + HOST = {{ .Values.service.gitea.cacheHost }} + + [webhook] + QUEUE_LENGTH = {{ .Values.service.gitea.webhookQueueLength }} + DELIVER_TIMEOUT = {{ .Values.service.gitea.webhookDeliverTimeout }} + SKIP_TLS_VERIFY = {{ .Values.service.gitea.webhookSkipTlsVerify }} + PAGING_NUM = {{ .Values.service.gitea.webhookPagingNum }} + + [log] + MODE = {{ .Values.service.gitea.logMode }} + LEVEL = {{ .Values.service.gitea.logLevel }} + + [other] + SHOW_FOOTER_BRANDING = {{ .Values.service.gitea.otherShowFooterBranding }} + SHOW_FOOTER_VERSION = {{ .Values.service.gitea.otherShowFooterVersion }} + SHOW_FOOTER_TEMPLATE_LOAD_TIME = {{ .Values.service.gitea.otherShowFooterTemplateLoadTime }} + + [indexer] + ISSUE_INDEXER_PATH = {{ .Values.service.gitea.indexerIssuePath }} diff --git a/incubator/gitea/templates/deployment.yaml b/incubator/gitea/templates/deployment.yaml new file mode 100644 index 000000000000..7a5a92feb98c --- /dev/null +++ b/incubator/gitea/templates/deployment.yaml @@ -0,0 +1,64 @@ +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: {{ template "gitea.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +spec: + replicas: 1 + strategy: + type: RollingUpdate + selector: + matchLabels: + app: {{ template "gitea.fullname" . }} + template: + metadata: + labels: + app: {{ template "gitea.fullname" . }} + spec: + initContainers: + - name: copy-app-ini + image: alpine:3.7 + command: ["/bin/sh"] + args: ["-c", "cp /config/* /config-rw/ ; chmod 777 /config-rw/*"] + volumeMounts: + - name: config + mountPath: /config + - name: config-rw + mountPath: /config-rw + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: 3000 + - containerPort: {{ .Values.service.sshPort | int }} + livenessProbe: + httpGet: + path: / + port: 3000 + readinessProbe: + httpGet: + path: / + port: 3000 + env: + resources: +{{ toYaml .Values.resources | indent 12 }} + volumeMounts: + - name: data + mountPath: /data + - name: config-rw + mountPath: /etc/gitea/conf + volumes: + - name: config + configMap: + name: {{ template "gitea.fullname" . }}-config + - name: config-rw + emptyDir: {} + - name: data + {{- if .Values.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ template "gitea.fullname" . }} + {{- else }} + emptyDir: {} + {{- end -}} diff --git a/incubator/gitea/templates/ingress.yaml b/incubator/gitea/templates/ingress.yaml new file mode 100644 index 000000000000..2056eef57d8e --- /dev/null +++ b/incubator/gitea/templates/ingress.yaml @@ -0,0 +1,33 @@ +{{- if .Values.service.ingress.enabled -}} +{{- $releaseName := .Release.Name -}} +{{- $serviceName := default "gitea" .Values.service.nameOverride -}} +{{- $fullName := include "gitea.fullname" . -}} +{{- $httpPort := .Values.service.httpPort -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ template "gitea.fullname" . }} + labels: + app: {{ template "gitea.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + annotations: + {{- range $key, $value := .Values.service.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +spec: + rules: + {{- range .Values.service.ingress.hosts }} + - host: {{ . }} + http: + paths: + - backend: + serviceName: {{ $fullName }} + servicePort: {{ $httpPort }} + {{- end -}} +{{- if .Values.service.ingress.tls }} + tls: +{{ toYaml .Values.service.ingress.tls | indent 4 }} +{{- end -}} +{{- end -}} diff --git a/incubator/gitea/templates/pvc.yaml b/incubator/gitea/templates/pvc.yaml new file mode 100644 index 000000000000..b19190247338 --- /dev/null +++ b/incubator/gitea/templates/pvc.yaml @@ -0,0 +1,24 @@ +{{- if .Values.persistence.enabled }} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ template "gitea.fullname" . }} + labels: + app: {{ template "gitea.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} +{{- if .Values.persistence.storageClass }} +{{- if (eq "-" .Values.persistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.persistence.storageClass }}" +{{- end }} +{{- end }} +{{- end }} diff --git a/incubator/gitea/templates/secrets.yaml b/incubator/gitea/templates/secrets.yaml new file mode 100644 index 000000000000..562df55b1bf0 --- /dev/null +++ b/incubator/gitea/templates/secrets.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ template "gitea.fullname" . }} + labels: + app: {{ template "gitea.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +type: Opaque +data: + postgresql-user: {{ .Values.postgresql.postgresUser | b64enc | quote }} diff --git a/incubator/gitea/templates/service.yaml b/incubator/gitea/templates/service.yaml new file mode 100644 index 000000000000..8d5dfe731c70 --- /dev/null +++ b/incubator/gitea/templates/service.yaml @@ -0,0 +1,21 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "gitea.fullname" . }} + labels: + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" +{{- if .Values.service.annotations }} + annotations: +{{ toYaml .Values.service.annotations | indent 4 }} +{{- end }} +spec: + type: {{ .Values.serviceType }} + ports: + - port: {{ .Values.service.httpPort | int }} + targetPort: 3000 + name: {{ default "gitea" .Values.service.nameOverride }}-http + - port: {{ .Values.service.sshPort | int }} + targetPort: {{ .Values.service.sshPort | int }} + name: {{ default "gitea" .Values.service.nameOverride }}-ssh + selector: + app: {{ template "gitea.fullname" . }} diff --git a/incubator/gitea/values.yaml b/incubator/gitea/values.yaml new file mode 100644 index 000000000000..2bd16a243685 --- /dev/null +++ b/incubator/gitea/values.yaml @@ -0,0 +1,294 @@ +## Override the name of the Chart. +## +# nameOverride: + +## Kubernetes configuration +## For minikube, set this to NodePort, elsewhere use LoadBalancer +## +serviceType: ClusterIP + +replicaCount: 1 + +image: + repository: gitea/gitea + tag: 1.4.2 + pullPolicy: IfNotPresent + +service: + ## Override the components name (defaults to service). + ## + # nameOverride: + + ## HTTP listen port. + ## ref: https://docs.gitea.io/en-us/config-cheat-sheet + ## + httpPort: 80 + + ## SSH listen port. + ## ref: https://docs.gitea.io/en-us/config-cheat-sheet + ## + sshPort: 22 + + ## SSH_DOMAIN - Domain name to be exposed in SSH clone URL. + ## ref: https://docs.gitea.io/en-us/config-cheat-sheet + ## + sshDomain: localhost + + ## Gitea configuration values + ## ref: https://docs.gitea.io/en-us/config-cheat-sheet + ## + gitea: + + ## Application name, can be your company or team name. + ## + appName: 'Gitea' + + ## Either "dev", "prod" or "test". + ## + runMode: 'prod' + + ## Force every new repository to be private. + ## + forcePrivate: false + + ## Indicates whether or not to disable Git clone through HTTP/HTTPS. When + ## disabled, users can only perform Git operations via SSH. + ## + disableHttpGit: false + + ## Indicates whether or not to enable repository file upload feature. + ## + repositoryUploadEnabled: true + + ## File types that are allowed to be uploaded, e.g. image/jpeg|image/png. + ## Leave empty means allow any file typ + ## + repositoryUploadAllowedTypes: + + ## Maximum size of each file in MB. + ## + repositoryUploadMaxFileSize: 3 + + ## Maximum number of files per upload. + ## + repositoryUploadMaxFiles: 5 + + ## Enable this to use captcha validation for registration. + ## + serviceEnableCaptcha: true + + ## Users need to confirm e-mail for registration + ## + serviceRegisterEmailConfirm: false + + ## Weather or not to allow users to register. + ## + serviceDisableRegistration: false + + ## Weather or not sign in is required to view anything. + ## + serviceRequireSignInView: false + + ## Mail notification + ## + serviceEnableNotifyMail: false + + ## Either "memory", "redis", or "memcache", default is "memory" + ## + cacheAdapter: memory + + ## For "memory" only, GC interval in seconds, default is 60 + ## + cacheInterval: 60 + + ## For "redis" and "memcache", connection host address + ## redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 + ## memcache: `127.0.0.1:11211` + ## + cacheHost: + + ## Enable this to use captcha validation for registration. + ## + serverDomain: gitea.example.com + + ## Full public URL of Gitea server. + ## + serverRootUrl: http://gitea.example.com/ + + ## Landing page for non-logged users, can be "home" or "explore" + ## + serverLandingPage: home + + ## Either "mysql", "postgres" or "sqlite3", you can connect to TiDB with + ## MySQL protocol. Default is to use the postgresql configuration included + ## with this chart. + ## + databaseType: postgres + + ## Database host. Unused unless `postgresql.install` is false. + ## + databaseHost: + + ## Database user. Unused unless `postgresql.install` is false. + ## + databaseUser: + + ## Database password. Unused unless `postgresql.install` is false. + ## + databasePassword: + + ## Database password. Unused unless `postgresql.install` is false. + ## + databaseName: + + ## Database path. Unused unless `databaseType = sqlite3` is false. + ## + databasePath: /data/gitea.db + + ## Hook task queue length, increase if webhook shooting starts hanging + ## + webhookQueueLength: 1000 + + ## Deliver timeout in seconds + ## + webhookDeliverTimeout: 5 + + ## Allow insecure certification + ## + webhookSkipTlsVerify: true + + ## Number of history information in each page + ## + webhookPagingNum: 10 + + ## Can be "console" and "file", default is "console" + ## Use comma to separate multiple modes, e.g. "console, file" + ## + logMode: console + + ## Either "Trace", "Info", "Warn", "Error", "Fatal", default is "Trace" + ## + logLevel: Trace + + ## Undocumented, but you can take a guess. + ## + otherShowFooterBranding: false + + ## Show version information about Gitea and Go in the footer + ## + otherShowFooterVersion: true + + ## Show time of template execution in the footer + ## + otherShowFooterTemplateLoadTime: true + + ## Change this value for your installation. + ## + securitySecretKey: "changeme" + + ## Number of repositories that are showed in one explore page + ## + uiExplorePagingNum: 20 + + ## Number of issues that are showed in one page + ## + uiIssuePagingNum: 10 + + ## Number of maximum commits showed in one activity feed. + ## NOTE: This value is also used in how many commits a webhook will send. + ## + uiFeedMaxCommitNum: 5 + + ## Index file used for issue search. + ## + indexerIssuePath: /data/issues.bleve + + ## Ingress configuration. + ## ref: https://kubernetes.io/docs/user-guide/ingress/ + ## + ingress: + ## Enable Ingress. + ## + enabled: false + + ## Annotations. + ## + # annotations: + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: 'true' + + ## Hostnames. + ## Must be provided if Ingress is enabled. + ## + # hosts: + # - gitea.domain.com + + ## TLS configuration. + ## Secrets must be manually created in the namespace. + ## + # tls: + # - secretName: gitea-tls + # hosts: + # - gitea.domain.com + + ## Service annotations. + ## Allows attaching metadata to services for kubernetes components to act on. + ## + # annotations: + # service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http + + +## Persistent Volume Storage configuration. +## ref: https://kubernetes.io/docs/user-guide/persistent-volumes +## +persistence: + ## Enable persistence using Persistent Volume Claims. + ## + enabled: true + + ## gitea data Persistent Volume Storage Class + ## If defined, storageClassName: + ## If set to "-", storageClassName: "", which disables dynamic provisioning + ## If undefined (the default) or set to null, no storageClassName spec is + ## set, choosing the default provisioner. (gp2 on AWS, standard on + ## GKE, AWS & OpenStack) + ## + # storageClass: "-" + + ## Persistent Volume Access Mode. + ## + accessMode: ReadWriteOnce + + ## Persistent Volume Storage Size. + ## + size: 1Gi + +## Configuration values for the postgresql dependency. +## ref: https://github.com/kubernetes/charts/blob/master/stable/postgresql/README.md +## +postgresql: + + ### Install PostgreSQL dependency + ## + install: true + + ### PostgreSQL User to create. + ## + postgresUser: gitea + + ## PostgreSQL Password for the new user. + ## If not set, a random 10 characters password will be used. + ## + postgresPassword: gitea + + ## PostgreSQL Database to create. + ## + postgresDatabase: gitea + + ## Persistent Volume Storage configuration. + ## ref: https://kubernetes.io/docs/user-guide/persistent-volumes + ## + persistence: + ## Enable PostgreSQL persistence using Persistent Volume Claims. + ## + enabled: true diff --git a/stable/etcd-operator/templates/_helpers.tpl b/stable/etcd-operator/templates/_helpers.tpl index 03f9a26b5efc..0bb36ac31bba 100644 --- a/stable/etcd-operator/templates/_helpers.tpl +++ b/stable/etcd-operator/templates/_helpers.tpl @@ -9,10 +9,19 @@ Expand the name of the chart. {{/* Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. */}} {{- define "etcd-operator.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} {{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s-%s" .Release.Name $name .Values.etcdOperator.name | trunc 63 | trimSuffix "-" -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} {{- end -}} {{- define "etcd-backup-operator.name" -}} @@ -72,4 +81,4 @@ Create the name of the restore-operator service account to use {{- else -}} {{ default "default" .Values.serviceAccount.restoreOperatorServiceAccount.name }} {{- end -}} -{{- end -}} \ No newline at end of file +{{- end -}}