Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #113 from acaire/add_helm_chart
Browse files Browse the repository at this point in the history
Add helm chart
  • Loading branch information
Christopher Hein committed Nov 2, 2018
2 parents 3f46646 + b8759d1 commit d1d2eef
Show file tree
Hide file tree
Showing 12 changed files with 524 additions and 17 deletions.
17 changes: 17 additions & 0 deletions charts/aws-service-operator/Chart.yaml
@@ -0,0 +1,17 @@
apiVersion: v1
name: aws-service-operator
version: 0.0.1
description: The AWS Service Operator allows you to manage AWS resources using Kubernetes Custom Resource Definitions.
keywords:
- AWS
home: https://github.com/awslabs/aws-service-operator
sources:
- https://github.com/awslabs/aws-service-operator
maintainers:
- name: christopherhein
email: heichris@amazon.com
- name: acaire
email: ash.caire@gmail.com
engine: gotpl
appVersion: v0.0.1-alpha2
tillerVersion: ">=2.8.0"
47 changes: 47 additions & 0 deletions charts/aws-service-operator/README.md
@@ -0,0 +1,47 @@
# AWS Service Operator

This is the Helm chart for the [AWS Service Operator](https://github.com/awslabs/aws-service-operator)

## Prerequisites

- Kubernetes 1.9+

## Installing the chart
Create AWS resources with Kubernetes
The chart can be installed by running:

```bash
$ helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
$ helm install incubator/aws-service-operator
```

## Configuration

The following table lists the configurable parameters of the aws-service-operator chart and their default values.

| Parameter | Description | Default |
| ------------------------- | -------------------------------------- | -------------------------------------------------- |
| `image.repository` | Container image repository | `awsserviceoperator/aws-service-operator` |
| `image.tag` | Container image tag | `v0.0.1-alpha2` |
| `image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `operator.accountId` | AWS Account ID to operator on | `""` |
| `operator.bucket` | Base bucket to store resources in | `aws-operator` |
| `operator.clusterName` | Used to label generated CF templates | `aws-operator` |
| `operator.config` | Config file | `$HOME/.aws-operator.yaml` |
| `operator.kubeconfig` | Path to local kubeconfig file | `""` |
| `operator.logfile` | Log file | `""` |
| `operator.loglevel` | Log level | `Info` |
| `operator.region` | AWS Region for created resources | `us-west-2` |
| `operator.resources` | Comma Delimited list of CRDS to deploy | `s3bucket,dynamodb` |
| `affinity` | affinity settings for pod assignment | `{}` |
| `extraArgs` | Optional CLI argument | `[]` |
| `extraEnv` | Optional environment variables | `[]` |
| `extraVolumes` | Custom Volumes | `[]` |
| `extraVolumeMounts` | Custom VolumeMounts | `[]` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `podAnnotations` | Annotations to attach to pod | `{}` |
| `rbac.create` | Create RBAC roles | `true` |
| `rbac.serviceAccountName` | Existing ServiceAccount to use | `default` |
| `replicas` | Deployment replicas | `1` |
| `resources` | container resource requests and limits | `{}` |
| `tolerations` | Toleration labels for pod assignment | `[]` |
10 changes: 10 additions & 0 deletions charts/aws-service-operator/templates/NOTES.txt
@@ -0,0 +1,10 @@
Thank you for installing the {{ .Chart.Name }} chart.

For more information on configuring {{ .Chart.Name }}, refer to {{ .Chart.Home }}

Your release is named {{ .Release.Name }}.

To learn more about the release, try:

$ helm status {{ .Release.Name }}
$ helm get {{ .Release.Name }}
61 changes: 61 additions & 0 deletions charts/aws-service-operator/templates/_helpers.tpl
@@ -0,0 +1,61 @@
{{/*
Helm standard labels.
*/}}
{{- define "aws-service-operator.helmStandardLabels" -}}
app.kubernetes.io/name: {{ include "aws-service-operator.name" . }}
helm.sh/chart: {{ include "aws-service-operator.chart" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- end -}}

{{/*
Helm pod labels.
*/}}
{{- define "aws-service-operator.helmPodLabels" -}}
app.kubernetes.io/name: {{ include "aws-service-operator.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "aws-service-operator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Expand the name of the chart.
*/}}
{{- define "aws-service-operator.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 "aws-service-operator.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 the name of the service account to use.
*/}}
{{- define "aws-service-operator.serviceAccountName" -}}
{{- if .Values.rbac.create -}}
{{ default (include "aws-service-operator.fullname" .) .Values.rbac.serviceAccountName }}
{{- else -}}
{{ default "default" .Values.rbac.serviceAccountName }}
{{- end -}}
{{- end -}}
50 changes: 50 additions & 0 deletions charts/aws-service-operator/templates/clusterrole.yaml
@@ -0,0 +1,50 @@
{{- if .Values.rbac.create -}}
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: {{ template "aws-service-operator.fullname" . }}
labels:
{{ include "aws-service-operator.helmStandardLabels" . | indent 4 }}
rules:
- apiGroups:
- ""
resources:
- secrets
- pods
- configmaps
- services
verbs:
- get
- list
- watch
- create
- delete
- update
- apiGroups:
- extensions
resources:
- thirdpartyresources
verbs:
- get
- list
- watch
- create
- delete
- update
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
- create
- delete
- apiGroups:
- service-operator.aws
resources:
- "*"
verbs:
- "*"
{{- end -}}
16 changes: 16 additions & 0 deletions charts/aws-service-operator/templates/clusterrolebinding.yaml
@@ -0,0 +1,16 @@
{{- if .Values.rbac.create }}
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: {{ template "aws-service-operator.fullname" . }}
labels:
{{ include "aws-service-operator.helmStandardLabels" . | indent 4 }}
roleRef:
name: {{ template "aws-service-operator.fullname" . }}
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
subjects:
- name: {{ template "aws-service-operator.fullname" . }}
kind: ServiceAccount
namespace: {{ .Release.Namespace }}
{{- end }}
129 changes: 129 additions & 0 deletions charts/aws-service-operator/templates/crd.yaml
@@ -0,0 +1,129 @@
apiVersion: v1
kind: List
items:
- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cloudformationtemplates.service-operator.aws
spec:
group: service-operator.aws
names:
kind: CloudFormationTemplate
listKind: CloudFormationTemplateList
plural: cloudformationtemplates
shortNames:
- cft
- cfts
- cfn
- cfns
- cloudformation
singular: cloudformationtemplates
scope: Namespaced
version: v1alpha1

- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: dynamodbs.service-operator.aws
spec:
group: service-operator.aws
names:
kind: DynamoDB
listKind: DynamoDBList
plural: dynamodbs
shortNames:
- ddb
- ddbs
- dynamo
- dynamotable
- dynamotables
singular: dynamodbs
scope: Namespaced
version: v1alpha1

- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: ecrrepositories.service-operator.aws
spec:
group: service-operator.aws
names:
kind: ECRRepository
listKind: ECRRepositoryList
plural: ecrrepositories
shortNames:
- ecr
- repository
singular: ecrrepositories
scope: Namespaced
version: v1alpha1

- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: s3buckets.service-operator.aws
spec:
group: service-operator.aws
names:
kind: S3Bucket
listKind: S3BucketList
plural: s3buckets
shortNames:
- s3
- bucket
- buckets
singular: s3buckets
scope: Namespaced
version: v1alpha1

- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: snssubscriptions.service-operator.aws
spec:
group: service-operator.aws
names:
kind: SNSSubscription
listKind: SNSSubscriptionList
plural: snssubscriptions
shortNames:
- subscription
singular: snssubscriptions
scope: Namespaced
version: v1alpha1

- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: snstopics.service-operator.aws
spec:
group: service-operator.aws
names:
kind: SNSTopic
listKind: SNSTopicList
plural: snstopics
shortNames:
- sns
- topic
- topics
singular: snstopics
scope: Namespaced
version: v1alpha1

- apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: sqsqueues.service-operator.aws
spec:
group: service-operator.aws
names:
kind: SQSQueue
listKind: SQSQueueList
plural: sqsqueues
shortNames:
- sqs
- queue
- queues
singular: sqsqueues
scope: Namespaced
version: v1alpha1

0 comments on commit d1d2eef

Please sign in to comment.