forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Aerospike #2
Open
ghost
wants to merge
31
commits into
master
Choose a base branch
from
aerospike
base: master
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
Aerospike #2
Changes from 18 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
eefdc32
add chart for aerospike
kavehmz ec8ec1a
Merge remote-tracking branch 'up/master' into aerospike
kavehmz ae75a82
movig the config content to value file so it can be overwritten by pa…
kavehmz 38de982
after moving the content to yaml file there is no need to keep this f…
kavehmz 69bcf1d
Merge remote-tracking branch 'up/master' into aerospike
kavehmz 55d7902
adding service type and related params to values.
kavehmz 20d0020
bumping aerospike version
kavehmz be7d2e3
Merge remote-tracking branch 'up/master' into aerospike
kavehmz 4990668
adding affinity for aerospike
kavehmz 807a728
bumping aerospike version
kavehmz cc01e89
Merge remote-tracking branch 'origin/master' into aerospike
kavehmz 2ea7e0b
Merge remote-tracking branch 'up/master' into aerospike
kavehmz 5a5e862
aerospike: changing the volumeClaimTemplates to be more general so we…
kavehmz 496c322
aerospike: Using a more general name in comment
kavehmz ee95d8e
aerospike: Bumping chart version based on new tweaks
kavehmz b483f7a
aerospike: removing trailing space to pass lint
kavehmz ba72ef3
aerospike: removing trailing space to pass yamllint
kavehmz 5657349
Merge remote-tracking branch 'up/master' into aerospike
kavehmz 04f0f0c
aerospike: we need to separate mesh service from client service. Mesh…
kavehmz a006aeb
aerospike: adding mess port to general service. This way a setup can …
kavehmz 708ca97
Merge remote-tracking branch 'up/master' into aerospike
kavehmz fce9ed4
[stable/aerospike] adding maintainers section to Charts.yaml
kavehmz 4be76bd
[stable/aerospike] Align table nicely.
kavehmz b108373
[stable/aerospike] namespacing templates (see #1785)
kavehmz 2a0b5be
[stable/aerospike] adding standard labels
kavehmz d14eecc
[stable/aerospike] removing unnecessary labels from statefulset tem…
kavehmz cda486d
[stable/aerospike] using IfNotPresent for pullPolicy
kavehmz fe0b1b5
[stable/aerospike] adding newline (Chart.yaml)
kavehmz 1a3c3d1
Merge remote-tracking branch 'up/master' into aerospike
kavehmz 383f023
[stable/aerospike] fixing a typo apiVersion -> appVersion
kavehmz b1d7ea6
[stable/aerospike] using github username
kavehmz 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 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,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 |
This file contains 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,11 @@ | ||
apiVersion: v3.14.1.2 | ||
description: A Helm chart for Aerospike in Kubernetes | ||
name: aerospike | ||
keywords: | ||
- aerospike | ||
- big-data | ||
home: http://aerospike.com | ||
version: 0.1.5 | ||
icon: https://s3-us-west-1.amazonaws.com/aerospike-fd/wp-content/uploads/2016/06/Aerospike_square_logo.png | ||
sources: | ||
- https://github.com/aerospike/aerospike-server |
This file contains 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,69 @@ | ||
# Aerospike Helm Chart | ||
|
||
This is an implementation of Aerospike StatefulSet found here: | ||
|
||
* https://github.com/aerospike/aerospike-kubernetes | ||
|
||
## Pre Requisites: | ||
|
||
* Kubernetes 1.5 with beta APIs enabled and support for statefulsets | ||
|
||
* PV support on underlying infrastructure (only if you are provisioning persistent volume). | ||
|
||
* Requires at least `v2.5.0` version of helm to support | ||
|
||
## StatefulSet Details | ||
|
||
* https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/ | ||
|
||
## StatefulSet Caveats | ||
|
||
* https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#limitations | ||
|
||
## Chart Details | ||
|
||
This chart will do the following: | ||
|
||
* Implement a dynamically scalable Aerospike cluster using Kubernetes StatefulSets | ||
|
||
### Installing the Chart | ||
|
||
To install the chart with the release name `my-aerospike` using a dedicated namespace(recommended): | ||
|
||
``` | ||
$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator | ||
$ helm install --name my-aerospike --namespace aerospike incubator/aerospike | ||
``` | ||
|
||
The chart can be customized using the following configurable parameters: | ||
|
||
| Parameter | Description | Default | | ||
| ----------------------- | ---------------------------------- | ---------------------------------------------------------- | | ||
| `image.repository` | Aerospike Container image name | `aerospike/aerospike-server` | | ||
| `image.tag` | Aerospike Container image tag | `3.14.1.2` | | ||
| `image.pullPolicy` | Aerospike Container pull policy | `Always` | | ||
| `replicaCount` | Aerospike Brokers | `1` | | ||
| `persistentVolume` | Configuration of persistent volumes for storage-engine | `{}` | | ||
| `confFile` | Aerospike config filename. This file should be included in the chart path. | `aerospike.conf` | | ||
| `resources` | Aerospike resource requests and limits | `{}` | | ||
| `nodeSelector` | Labels for pod assignment | `{}` | | ||
| `terminationGracePeriodSeconds` | This is the time kubernetes will wait before forcefully terminating the container | `30` | | ||
|
||
Specify parameters using `--set key=value[,key=value]` argument to `helm install` | ||
|
||
Alternatively a YAML file that specifies the values for the parameters can be provided like this: | ||
|
||
```bash | ||
$ helm install --name my-aerospike -f values.yaml incubator/aerospike | ||
``` | ||
|
||
### Conf files for Aerospike | ||
|
||
There is one conf file added to each Aerospike release. This conf file can be replaced with a custom file and updating the `confFile` value. | ||
|
||
If you modify the `aerospike.conf` (and you use more than 1 replica), you want to add the `#REPLACE_THIS_LINE_WITH_MESH_CONFIG` comment to the config file (see the default conf file). This will update your mesh to connect each replica. | ||
|
||
## Known Limitations | ||
|
||
* Persistent volume claims tested only on GCP | ||
* Aerospike cluster is not accessible via an external endpoint |
This file contains 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,8 @@ | ||
The Aerospike can be accessed via port 3000 on the following DNS name from within your cluster: | ||
|
||
{{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local | ||
|
||
You can connect to aeropike in your local machine using port-forwarding: | ||
|
||
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 3000:3000 |
This file contains 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,26 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "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). | ||
*/}} | ||
{{- define "fullname" -}} | ||
{{- $name := default .Chart.Name .Values.nameOverride -}} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} | ||
{{- end -}} | ||
|
||
{{/* | ||
Create aerospike mesh setup | ||
*/}} | ||
{{- define "aerospike.mesh" -}} | ||
{{- $fullname := include "fullname" . -}} | ||
{{- range $i, $e := until (.Values.replicaCount|int) }} | ||
{{ printf "mesh-seed-address-port %s-%d.%s 3002" $fullname $i $fullname }} | ||
{{- end -}} | ||
{{- end -}} |
This file contains 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,9 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
data: | ||
aerospike.conf: | | ||
# aerospike configuration | ||
{{- $mesh := include "aerospike.mesh" . }} | ||
{{ .Values.confFile |replace "#REPLACE_THIS_LINE_WITH_MESH_CONFIG" $mesh | indent 4}} |
This file contains 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,30 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
app: {{ template "name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
annotations: | ||
service.alpha.kubernetes.io/tolerate-unready-endpoints: "true" | ||
{{- range $key, $value := .Values.service.annotations }} | ||
{{ $key }}: {{ $value | quote }} | ||
{{- end }} | ||
spec: | ||
{{ if .Values.service.clusterIP }} | ||
clusterIP: {{ .Values.service.clusterIP | quote }} | ||
{{ end }} | ||
type: {{ .Values.service.type }} | ||
{{ if eq .Values.service.type "LoadBalancer" -}} {{ if .Values.service.loadBalancerIP -}} | ||
loadBalancerIP: {{ .Values.service.loadBalancerIP }} | ||
{{ end -}} | ||
{{- end -}} | ||
ports: | ||
- port: 3000 | ||
protocol: TCP | ||
name: aerospike-client | ||
selector: | ||
app: {{ template "name" . }} | ||
release: {{ .Release.Name }} |
This file contains 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,66 @@ | ||
apiVersion: apps/v1beta1 | ||
kind: StatefulSet | ||
metadata: | ||
name: {{ template "fullname" . }} | ||
labels: | ||
app: {{ template "name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
serviceName: {{ template "fullname" . }} | ||
replicas: {{ .Values.replicaCount }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ template "name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
release: {{ .Release.Name }} | ||
heritage: {{ .Release.Service }} | ||
spec: | ||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }} | ||
containers: | ||
- name: {{ template "fullname" . }} | ||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" | ||
imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
ports: | ||
- containerPort: 3000 | ||
name: aero-clients | ||
- containerPort: 3002 | ||
name: aero-mesh | ||
- containerPort: 3003 | ||
name: aero-info | ||
readinessProbe: | ||
tcpSocket: | ||
port: 3000 | ||
initialDelaySeconds: 15 | ||
timeoutSeconds: 1 | ||
volumeMounts: | ||
- name: config-volume | ||
mountPath: /etc/aerospike | ||
{{- range $pv := .Values.persistentVolume }} | ||
- name: {{ $pv.name | quote }} | ||
mountPath: {{ $pv.mountPath | quote }} | ||
{{- end }} | ||
resources: | ||
{{ toYaml .Values.resources | indent 10 }} | ||
nodeSelector: | ||
{{ toYaml .Values.nodeSelector | indent 8 }} | ||
{{- if .Values.affinity }} | ||
affinity: | ||
{{ toYaml .Values.affinity | indent 8 }} | ||
{{- end }} | ||
volumes: | ||
- name: config-volume | ||
configMap: | ||
name: {{ template "fullname" . }} | ||
items: | ||
- key: aerospike.conf | ||
path: aerospike.conf | ||
volumeClaimTemplates: | ||
{{- range $pv := .Values.persistentVolume }} | ||
- metadata: | ||
name: {{ $pv.name | quote }} | ||
spec: | ||
{{ toYaml $pv.template | indent 6 }} | ||
{{- end }} |
This file contains 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,96 @@ | ||
# Default values for aerospike. | ||
terminationGracePeriodSeconds: 30 | ||
replicaCount: 1 | ||
nodeSelector: {} | ||
image: | ||
repository: aerospike/aerospike-server | ||
tag: 3.14.1.2 | ||
pullPolicy: Always | ||
|
||
# Set as empty object {} if no volumes need to be created | ||
# See confFile below | ||
persistentVolume: {} | ||
# - mountPath: /opt/aerospike/data | ||
# name: aerospike-data | ||
# template: | ||
# accessModes: [ "ReadWriteOnce" ] | ||
# # storageClassName: "standard" | ||
# resources: | ||
# requests: | ||
# storage: "36G" | ||
# selector: | ||
# matchLabels: | ||
# diskname: "aerospike-data" | ||
|
||
service: | ||
type: ClusterIP | ||
annotations: {} | ||
loadBalancerIP: | ||
clusterIP: None | ||
|
||
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 | ||
|
||
confFile: |- | ||
#default config file | ||
service { | ||
user root | ||
group root | ||
paxos-single-replica-limit 1 | ||
pidfile /var/run/aerospike/asd.pid | ||
service-threads 4 | ||
transaction-queues 4 | ||
transaction-threads-per-queue 4 | ||
proto-fd-max 15000 | ||
} | ||
logging { | ||
file /var/log/aerospike/aerospike.log { | ||
context any info | ||
} | ||
|
||
console { | ||
context any info | ||
} | ||
} | ||
network { | ||
service { | ||
address any | ||
port 3000 | ||
} | ||
heartbeat { | ||
address any | ||
interval 150 | ||
#REPLACE_THIS_LINE_WITH_MESH_CONFIG | ||
mode mesh | ||
port 3002 | ||
timeout 20 | ||
protocol v3 | ||
|
||
} | ||
fabric { | ||
port 3001 | ||
} | ||
|
||
info { | ||
port 3003 | ||
} | ||
} | ||
|
||
namespace test { | ||
replication-factor 2 | ||
memory-size 1G | ||
default-ttl 5d | ||
storage-engine device { | ||
file /opt/aerospike/data/test.dat | ||
filesize 4G | ||
} | ||
} |
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.
In principle with Kubernetes we don't need to log to files anymore. I think it should be enough to log to the console.