diff --git a/charts/oopsy/.helmignore b/charts/oopsy/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/charts/oopsy/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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 -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/oopsy/Chart.lock b/charts/oopsy/Chart.lock new file mode 100644 index 0000000..c26fc25 --- /dev/null +++ b/charts/oopsy/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: rails-application + repository: https://klausmeyer.github.io/helm-charts + version: 0.1.0-alpha2 +- name: redis + repository: https://groundhog2k.github.io/helm-charts + version: 0.7.10 +digest: sha256:ad881f7e6607d089740c1968f3948cf8edf4aab90b319325131ab7fca3ea50eb +generated: "2024-04-26T16:43:21.424829808+02:00" diff --git a/charts/oopsy/Chart.yaml b/charts/oopsy/Chart.yaml index 73962f6..a6a1108 100644 --- a/charts/oopsy/Chart.yaml +++ b/charts/oopsy/Chart.yaml @@ -1,24 +1,14 @@ apiVersion: v2 name: oopsy -description: Rails based error tracker - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. +description: A Helm chart for Kubernetes type: application +version: "0.2.0-alpha1" -# 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.1 +dependencies: + - name: rails-application + version: "0.1.0-alpha2" + repository: https://klausmeyer.github.io/helm-charts -# 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-dev" + - name: redis + version: "0.7.10" + repository: https://groundhog2k.github.io/helm-charts diff --git a/charts/oopsy/README.md b/charts/oopsy/README.md deleted file mode 100644 index 1c123f4..0000000 --- a/charts/oopsy/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Oopsy - -A Helm chart for https://github.com/klausmeyer/oopsy - -## Changelog - -see [RELEASENOTES.md](RELEASENOTES.md) - -## Usage - -```shell -helm repo add klausmeyer https://klausmeyer.github.io/helm-charts/ -helm install my-release klausmeyer/oopsy -``` - -## Warning - -The application isn't doing any versioning yet so this chart uses the `latest` Docker tag by default. diff --git a/charts/oopsy/RELEASENOTES.md b/charts/oopsy/RELEASENOTES.md deleted file mode 100644 index 0f4bf56..0000000 --- a/charts/oopsy/RELEASENOTES.md +++ /dev/null @@ -1,6 +0,0 @@ -# Changelog - -| Chart version | App version | Change description | -| :------------ | :------------ | :-------------------------- | -| `0.1.0` | `1.0.0-dev` | Initial chart version | -| `0.1.1` | `1.0.0-dev` | Changed health-check routes | diff --git a/charts/oopsy/templates/_helpers.tpl b/charts/oopsy/templates/_helpers.tpl deleted file mode 100644 index befa076..0000000 --- a/charts/oopsy/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "oopsy.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 "oopsy.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 chart name and version as used by the chart label. -*/}} -{{- define "oopsy.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "oopsy.labels" -}} -helm.sh/chart: {{ include "oopsy.chart" . }} -{{ include "oopsy.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "oopsy.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oopsy.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "oopsy.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "oopsy.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/charts/oopsy/templates/db-prepare-job.yaml b/charts/oopsy/templates/db-prepare-job.yaml deleted file mode 100644 index 386d712..0000000 --- a/charts/oopsy/templates/db-prepare-job.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: batch/v1 -kind: Job -metadata: - name: {{ include "oopsy.fullname" . }}-db-prepare - annotations: - "helm.sh/hook": pre-install,pre-upgrade - "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded -spec: - template: - spec: - containers: - - name: db-setup - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- with .Values.environment }} - env: - {{- range $key, $value := . }} - - name: "{{ $key }}" - value: "{{ $value }}" - {{- end }} - {{- end }} - command: ["rails", "db:prepare"] - restartPolicy: Never diff --git a/charts/oopsy/templates/deployment-sidekiq.yaml b/charts/oopsy/templates/deployment-sidekiq.yaml deleted file mode 100644 index 4ec28c0..0000000 --- a/charts/oopsy/templates/deployment-sidekiq.yaml +++ /dev/null @@ -1,59 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "oopsy.fullname" . }}-sidekiq - labels: - {{- include "oopsy.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount.sidekiq }} - {{- end }} - selector: - matchLabels: - {{- include "oopsy.selectorLabels" . | nindent 6 }} - kind: sidekiq - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - kind: sidekiq - {{- include "oopsy.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "oopsy.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }}-sidekiq - args: ["sidekiq", "-c", "{{ .Values.sidekiq.concurrency }}"] - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- with .Values.environment }} - env: - {{- range $key, $value := . }} - - name: "{{ $key }}" - value: "{{ $value }}" - {{- end }} - {{- end }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/oopsy/templates/deployment-web.yaml b/charts/oopsy/templates/deployment-web.yaml deleted file mode 100644 index 55db476..0000000 --- a/charts/oopsy/templates/deployment-web.yaml +++ /dev/null @@ -1,71 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "oopsy.fullname" . }}-web - labels: - {{- include "oopsy.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount.web }} - {{- end }} - selector: - matchLabels: - {{- include "oopsy.selectorLabels" . | nindent 6 }} - kind: web - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - kind: web - {{- include "oopsy.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "oopsy.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ .Chart.Name }}-web - args: ["web"] - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - {{- with .Values.environment }} - env: - {{- range $key, $value := . }} - - name: "{{ $key }}" - value: "{{ $value }}" - {{- end }} - {{- end }} - ports: - - name: http - containerPort: 8080 - protocol: TCP - livenessProbe: - httpGet: - path: /health - port: http - readinessProbe: - httpGet: - path: /health/all - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/oopsy/templates/hpa.yaml b/charts/oopsy/templates/hpa.yaml deleted file mode 100644 index 87dcfbf..0000000 --- a/charts/oopsy/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "oopsy.fullname" . }} - labels: - {{- include "oopsy.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "oopsy.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/charts/oopsy/templates/ingress.yaml b/charts/oopsy/templates/ingress.yaml deleted file mode 100644 index 858b467..0000000 --- a/charts/oopsy/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "oopsy.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "oopsy.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/charts/oopsy/templates/service.yaml b/charts/oopsy/templates/service.yaml deleted file mode 100644 index 79a617b..0000000 --- a/charts/oopsy/templates/service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "oopsy.fullname" . }} - labels: - {{- include "oopsy.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - kind: web - {{- include "oopsy.selectorLabels" . | nindent 4 }} diff --git a/charts/oopsy/templates/serviceaccount.yaml b/charts/oopsy/templates/serviceaccount.yaml deleted file mode 100644 index ea7249b..0000000 --- a/charts/oopsy/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "oopsy.serviceAccountName" . }} - labels: - {{- include "oopsy.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/oopsy/values.yaml b/charts/oopsy/values.yaml index 78b0ad6..79ec627 100644 --- a/charts/oopsy/values.yaml +++ b/charts/oopsy/values.yaml @@ -1,89 +1,30 @@ -# Default values for oopsy. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: - web: 1 - sidekiq: 1 - -image: - repository: klausmeyer/oopsy - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "latest" - -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: 80 - -ingress: - enabled: false - className: "" - annotations: {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - 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: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -environment: {} - -sidekiq: - concurrency: 10 +rails-application: + name: oopsy + version: "0.1.0" + + image: + repository: klausmeyer/oopsy + + environment: + # sealedSecrets: false + plain: + # PUBLIC_HOST: "<...>" + # PUBLIC_PORT: "<...>" + # PUBLIC_SCHEME: "<...>" + REDIS_URL: "redis://oopsy-redis:6379/0" + # WEBHOOK_DISCORD_ENABLED: "<...>" + # WEBHOOKS_ENABLED: "<...>" + secret: {} + # DATABASE_URL: "<...>" + # SECRET_KEY_BASE: "<...>" + # WEBHOOK_DISCORD_URL: "<...>" + + deployments: + web: + enabled: true + sidekiq: + enabled: true + +redis: + haMode: + enabled: false diff --git a/charts/whatchy/values.yaml b/charts/whatchy/values.yaml index aad3a4f..58d970f 100644 --- a/charts/whatchy/values.yaml +++ b/charts/whatchy/values.yaml @@ -36,7 +36,3 @@ rails-application: daily: schedule: "30 6 * * *" args: ["rake", "crons:daily"] - -redis: - haMode: - enabled: false