-
-
Notifications
You must be signed in to change notification settings - Fork 16
Add dragonfly chart #7
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
Open
timetinytim
wants to merge
10
commits into
main
Choose a base branch
from
INF-310-add-dragonfly
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ba8a706
Add dragonfly chart
timetinytim 79a511e
Additional tweaks
timetinytim a687fc0
Cleanup
timetinytim 9e2fe4d
Update image repo
timetinytim b988add
Update image repo
timetinytim 50b90d4
Replicas fix
timetinytim 488498f
Add password auth config
timetinytim a103af5
Rename chart
timetinytim 9675a05
Rename chart
timetinytim fa1aa04
- Add ability to specify custom CLI args
timetinytim File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| apiVersion: v2 | ||
| name: dragonfly | ||
| description: Dragonfly deployments for a Mastodon app. | ||
|
|
||
| # 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. | ||
| type: application | ||
|
|
||
| # 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: "v1.31.2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "dragonfly.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 "dragonfly.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 "dragonfly.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "dragonfly.labels" -}} | ||
| helm.sh/chart: {{ include "dragonfly.chart" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/name: dragonfly | ||
| app.kubernetes.io/instance: {{ include "dragonfly.fullname" . }} | ||
| app.kubernetes.io/part-of: dragonfly-operator | ||
| app.kubernetes.io/created-by: dragonfly-operator | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| apiVersion: dragonflydb.io/v1alpha1 | ||
| kind: Dragonfly | ||
| metadata: | ||
| name: {{ include "dragonfly.fullname" . }}-app | ||
| labels: | ||
| {{- include "dragonfly.labels" . | nindent 4 }} | ||
| {{- with .Values.labels }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
| {{- if .Values.nodeSelector }} | ||
| nodeSelector: | ||
| {{- with .Values.nodeSelector }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| replicas: {{ .Values.replicas }} | ||
| args: | ||
| - "--dbfilename=dragonflydbSnapshot" | ||
| {{- if .Values.authentication.secret }} | ||
| authentication: | ||
| passwordFromSecret: | ||
| name: {{ .Values.authentication.secret }} | ||
| key: {{ .Values.authentication.key }} | ||
| {{- end }} | ||
| snapshot: | ||
| cron: "{{ .Values.snapshot.cron }}" | ||
| persistentVolumeClaimSpec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.snapshot.storage }} | ||
| {{- if .Values.resources }} | ||
| resources: | ||
| {{- with .Values.resources }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| apiVersion: dragonflydb.io/v1alpha1 | ||
| kind: Dragonfly | ||
| metadata: | ||
| name: {{ include "dragonfly.fullname" . }}-cache | ||
| labels: | ||
| {{- include "dragonfly.labels" . | nindent 4 }} | ||
| {{- with .Values.labels }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
| {{- if .Values.nodeSelector }} | ||
| nodeSelector: | ||
| {{- with .Values.nodeSelector }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| replicas: {{ .Values.replicas }} | ||
| args: | ||
| - "--dbfilename=dragonflydbSnapshot" | ||
| {{- if .Values.authentication.secret }} | ||
| authentication: | ||
| passwordFromSecret: | ||
| name: {{ .Values.authentication.secret }} | ||
| key: {{ .Values.authentication.key }} | ||
| {{- end }} | ||
| snapshot: | ||
| cron: "{{ .Values.snapshot.cron }}" | ||
| persistentVolumeClaimSpec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.snapshot.storage }} | ||
| {{- if .Values.resources }} | ||
| resources: | ||
| {{- with .Values.resources }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| apiVersion: dragonflydb.io/v1alpha1 | ||
| kind: Dragonfly | ||
| metadata: | ||
| name: {{ include "dragonfly.fullname" . }}-sidekiq | ||
| labels: | ||
| {{- include "dragonfly.labels" . | nindent 4 }} | ||
| {{- with .Values.labels }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" | ||
| {{- if .Values.nodeSelector }} | ||
| nodeSelector: | ||
| {{- with .Values.nodeSelector }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} | ||
| replicas: {{ .Values.replicas }} | ||
| args: | ||
| - "--dbfilename=dragonflydbSnapshot" | ||
| {{- if .Values.authentication.secret }} | ||
| authentication: | ||
| passwordFromSecret: | ||
| name: {{ .Values.authentication.secret }} | ||
| key: {{ .Values.authentication.key }} | ||
| {{- end }} | ||
| snapshot: | ||
| cron: "{{ .Values.snapshot.cron }}" | ||
| persistentVolumeClaimSpec: | ||
| accessModes: | ||
| - ReadWriteOnce | ||
| resources: | ||
| requests: | ||
| storage: {{ .Values.snapshot.storage }} | ||
| {{- if .Values.resources }} | ||
| resources: | ||
| {{- with .Values.resources }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| {{- end }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Default values for dragonfly. | ||
| # This is a YAML-formatted file. | ||
| # Declare variables to be passed into your templates. | ||
|
|
||
| # Number of replicas for each dragonfly cluster. | ||
| replicas: 1 | ||
|
|
||
| image: | ||
| repository: ghcr.io/dragonflydb/dragonfly | ||
| pullPolicy: IfNotPresent | ||
| # Overrides the image tag whose default is the chart appVersion. | ||
| tag: "" | ||
|
|
||
| nameOverride: "" | ||
| fullnameOverride: "" | ||
|
|
||
| # Whether to enable password authentication. | ||
| authentication: | ||
| secret: | ||
| key: password | ||
|
|
||
| # Regular snapshot backups to be made to an attached volume. | ||
| snapshot: | ||
| cron: "*/5 * * * *" # Every 5 minutes | ||
| storage: 20Gi | ||
|
|
||
| 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 | ||
|
|
||
| nodeSelector: {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure we should name this chart
dragonfly.This is specifically related to Mastodon, so something like
dragonfly-mastodon-instanceis probably more accurate here, or maybe evendragonfly-operator-mastodon-instanceThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That definitely makes sense.
I prefer names of things to be as short as possible, so I would prefer
dragonfly-mastodon-deploy