Make charts

pull/151/head
Steven Crespo 2021-09-01 12:16:17 -07:00
parent bda42f698a
commit dce7ebc365
16 changed files with 506 additions and 0 deletions

Binary file not shown.

View File

@ -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

View File

@ -0,0 +1,18 @@
annotations:
catalog.cattle.io/certified: partner
catalog.cattle.io/release-name: streamsets
apiVersion: v1
appVersion: 3.8.0
description: Control Agent for managing StreamSets Control Hub Deployments
home: https://streamsets.com
keywords:
- streamsets
- sdc
- sch
maintainers:
- email: thomas.ganka@streamsets.com
name: thomasganka
name: control-agent
sources:
- https://github.com/streamsets/helm-charts/tree/master/incubating/control-agent
version: 2.0.101

View File

@ -0,0 +1,52 @@
# StreamSets Control Agent
The [StreamSets](https://streamsets.com) control agent manages StreamSets Control Hub deployments.
## Introduction
This chart supports both RBAC and non-RBAC enabled clusters. It has no dependencies.
## Installing the Chart
First, add the streamsets stable repository to helm.
```bash
helm repo add streamsets https://streamsets.github.io/helm-charts/stable
```
To install the chart with the release name `my-release` into the namespace `streamsets`:
```bash
helm install streamsets/control-agent --name my-release --namespace streamsets
```
## Configuration
The following tables lists the configurable parameters of the chart and their default values.
| Parameter | Description | Default |
| ------------------------------- | -------------------------------------------------------------------- | ----------------------------------------- |
| `image.repository` | Control Agent image name | `streamsets/control-agent` |
| `image.tag` | The version of the official image to use | `3.0.0` |
| `image.pullPolicy` | Pull policy for the image | `IfNotPresent` |
| `streamsets.orgId` | This is the part of your SCH/DPM username after the `@` | None (Required) |
| `streamsets.api.url` | The URL for the SCH/DPM instance to connect to | `https://cloud.streamsets.com` |
| `streamsets.api.token` | Agent auth token from the SCH/DPM REST API or UI | None (Required) |
| `rbac.enabled` | Creates req'd ServiceAccount and Role on RBAC-enabled cluster | `true` |
| `resources` | Resource request for the pod | None |
| `nodeSelector` | Node Selector to apply to the deployment | None |
`streamsets.api.token` and `streamsets.orgId` are required values
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:
```bash
helm install streamsets/control-agent --set streamsets.api.token="my_api_token" --set streamsets.orgId="my_org"
```
Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:
```bash
helm install streamsets/control-agent --values values.yaml
```

View File

@ -0,0 +1,5 @@
# Streamsets
[Streamsets](https://www.streamsets.com/) is a data engineering platform. This chart adds the Streamsets Agent to all nodes in your cluster. The agent communicates with Control Hub to automatically provision Data Collector containers in the Kubernetes cluster in which it runs [Streamsets Control Hub](https://streamsets.com/documentation/controlhub/latest/help/controlhub/UserGuide/GettingStarted/DPM.html#concept_l45_qwf_xw. For more information about deploying Streamsets on Kubernetes, please refer to the [Streamsets documentation website](https://streamsets.com/documentation/controlhub/latest/help/controlhub/UserGuide/DataCollectorsProvisioned/Provisioned.html#concept_jsd_v24_lbb).
Streamsets [Docker Image](https://hub.docker.com/r/streamsets/datacollector).

View File

@ -0,0 +1,17 @@
[libdefaults]
default_realm = <realm of your organization>
dns_lookup_kdc = false
dns_lookup_realm = false
ticket_lifetime = 86400
renew_lifetime = 604800
forwardable = true
default_tgs_enctypes = aes256-cts
default_tkt_enctypes = aes256-cts
permitted_enctypes = aes256-cts
udp_preference_limit = 1
[realms]
<realm of your organization> = {
kdc = <kdc>
admin_server = <admin server>
}

View File

@ -0,0 +1,65 @@
questions:
#image configurations
- variable: defaultImage
default: true
description: "Use default Streamsets image or specify a custom one"
label: Use Default Streamsets Image
type: boolean
show_subquestion_if: false
group: "Container Images"
subquestions:
- variable: image.repository
default: "streamsets/control-agent"
description: "Streamsets Control Agent Image Name"
type: string
label: Streamsets Control Agent Image Name
- variable: image.tag
default: "3.0.0"
description: "Streamsets Image Tag"
type: string
label: Streamsets Image Tag
- variable: image.pullPolicy
default: "IfNotPresent"
description: "Pull policy for the image"
type: string
label: Streamsets Pull Policy
#streamsets configurations
- variable: streamsets.orgId
default: ""
description: "This is the part of your Streamsets Control Hub username after the `@`"
type: string
label: Enable Org ID
required: true
group: "Streamsets Org ID"
- variable: streamsets.api.url
default: "https://cloud.streamsets.com"
description: "The URL for the Streamsets Control Hub instance to connect to. Default is Streamsets Hosted Service"
type: string
label: Enable Streamsets API URL
required: false
group: "Streamsets API URL"
- variable: streamsets.api.token
default: ""
description: "Agent auth token from the Streamsets Control Hub REST API or UI"
type: string
required: true
label: Agent Auth Token
group: "Agent Auth Token"
- variable: rbac.enabled
default: true
description: "Creates req'd ServiceAccount and Role on RBAC-enabled cluster"
type: boolean
label: Enable RBAC
group: "RBAC"
- variable: resources
default: ""
description: "Resource request for the Control Agent pod"
type: string
label: Resource request for Streamsets Control Agent
group: "Resource request"
- variable: nodeSelector
default: ""
description: "Node Selector to apply to the deployment "
type: string
label: Node Selector for Streamsets Control Agent
group: "Node Selector"

View File

@ -0,0 +1,2 @@
The agent has been successfully installed.
Visit {{ .Values.streamsets.api.url }}/sch/provisioning/deployments to continue setup.

View File

@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "control-agent.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 "control-agent.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 "control-agent.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

View File

@ -0,0 +1,87 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "control-agent.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
{{- if .Values.rbac.enabled }}
serviceAccountName: {{ include "control-agent.fullname" . }}
{{- else }}
serviceAccountName: default
{{- end }}
terminationGracePeriodSeconds: 60
containers:
- name: {{ include "control-agent.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.krb.enabled }}
volumeMounts:
- name: krb5conf
mountPath: "/opt/kerberos"
readOnly: true
{{- end}}
{{- if .Values.resources }}
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- end }}
env:
- name: HOST
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: dpm_agent_master_url
value: "https://kubernetes.default.svc.cluster.local"
- name: dpm_agent_cof_type
value: KUBERNETES
- name: dpm_agent_dpm_baseurl
value: {{ default "https://cloud.streamsets.com" .Values.streamsets.api.url }}
- name: dpm_agent_component_id
value: {{ .Release.Name }}-{{ .Values.streamsets.orgId }}
- name: dpm_agent_token_string
valueFrom:
secretKeyRef:
name: {{ include "control-agent.fullname" . }}
key: apiToken
- name: dpm_agent_name
value: {{ .Release.Name }}
- name: dpm_agent_orgId
value: {{required "An SCH orgId is required!" .Values.streamsets.orgId }}
- name: dpm_agent_secret
value: {{ include "control-agent.fullname" . }}
- name: dpm_agent_crd_enabled
value: "{{.Values.streamsets.crdEnabled}}"
{{- if .Values.krb.enabled }}
- name: dpm_agent_kerberos_enabled
value: "true"
- name: KRB5_CONFIG
value: "/opt/kerberos/krb5.conf"
- name: dpm_agent_kerberos_secret
value: kerbsecret
- name: dpm_agent_kdc_type
value: {{ .Values.krb.kdcType }}
{{- end}}
{{- if .Values.krb.enabled }}
volumes:
- name: krb5conf
secret:
secretName: krb5conf
{{- end}}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}

View File

@ -0,0 +1,32 @@
{{- if .Values.krb.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: krb5conf
labels:
app: {{ template "control-agent.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
{{ (.Files.Glob "krb/krb5.conf").AsSecrets | indent 2 }}
---
apiVersion: v1
kind: Secret
metadata:
name: kerbsecret
labels:
app: {{ template "control-agent.fullname" . }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
type: Opaque
data:
encryption_types: {{required "encryption types to use when creating a keytab for service principal!" .Values.krb.encryptionTypes | b64enc }}
container_dn: {{required "distinguished name of the container under which new principals will be created is required!" .Values.krb.containerDn | b64enc }}
ldap_url: {{required "URL of the LDAP service provider is required!" .Values.krb.ldapUrl | b64enc }}
admin_principal: {{required "user account which has privileges to create, search and destroy service principals is required!" .Values.krb.adminPrincipal | b64enc }}
admin_key : {{required "secret key for the admin principal is required!" .Values.krb.adminKey | b64enc }}
realm : {{required "the realm of the organization is required!" .Values.krb.realm | b64enc }}
{{- end}}

View File

@ -0,0 +1,91 @@
{{- if .Values.rbac.enabled }}
kind: ServiceAccount
apiVersion: v1
metadata:
name: {{ include "control-agent.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
namespace: {{ .Release.Namespace }}
name: {{ include "control-agent.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
rules:
- apiGroups: ["", "extensions", "autoscaling", "apps"]
resources: ["pods", "deployments", "replicasets", "horizontalpodautoscalers", "services", "ingresses"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "update"]
{{- if .Values.streamsets.crdEnabled }}
- apiGroups: ["streamsets.k8s.io"]
resources: ["sdcs"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: RoleBinding
metadata:
name: {{ include "control-agent.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ include "control-agent.fullname" . }}
subjects:
- kind: ServiceAccount
name: {{ include "control-agent.fullname" . }}
namespace: {{ .Release.Namespace }}
---
{{- if .Values.streamsets.crdEnabled }}
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: streamsets-crd-handler
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
rules:
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions", ]
verbs: ["get", "list", "watch"]
- apiGroups: ["apiextensions.k8s.io", "streamsets.k8s.io"]
resources: ["customresourcedefinitions", "sdcs"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "control-agent.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: streamsets-crd-handler
subjects:
- kind: ServiceAccount
name: {{ include "control-agent.fullname" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}

View File

@ -0,0 +1,22 @@
{{- if .Values.streamsets.crdEnabled }}
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: sdcs.streamsets.k8s.io
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
annotations:
"helm.sh/hook": crd-install
"helm.sh/hook-delete-policy": before-hook-creation
scope: Namespaced
spec:
group: streamsets.k8s.io
version: v1
names:
kind: SdcCustomResource
plural: sdcs
singular: sdc
{{- end }}

View File

@ -0,0 +1,12 @@
kind: Secret
apiVersion: v1
metadata:
name: {{ include "control-agent.fullname" . }}
labels:
app.kubernetes.io/name: {{ include "control-agent.name" . }}
helm.sh/chart: {{ include "control-agent.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
type: Opaque
data:
apiToken: {{ required "A Control Agent API token is required!" .Values.streamsets.api.token | b64enc }}

View File

@ -0,0 +1,28 @@
# Default values for Streamsets Control Agent
image:
repository: streamsets/control-agent
tag: latest
pullPolicy: Always
streamsets:
orgId: <your org id>
crdEnabled: false
api:
url: https://cloud.streamsets.com
token: <auth token for agent>
rbac:
enabled: true
krb:
enabled: false
encryptionTypes: <encryption types to use when creating a keytab for service principal>
containerDn: <distinguished name of the container under which new principals will be created>
ldapUrl: <URL of the LDAP service provider>
adminPrincipal: <user account which has privileges to create, search and destroy service principals>
adminKey: <secret key for the above account>
realm: <the realm of the organization>
kdcType: < AD | MIT >
##
## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
resources: {}
nodeSelector: {}

View File

@ -453,6 +453,28 @@ entries:
- assets/cockroachdb/cockroachdb-4.1.200.tgz
version: 4.1.200
control-agent:
- annotations:
catalog.cattle.io/certified: partner
catalog.cattle.io/release-name: streamsets
apiVersion: v1
appVersion: 3.8.0
created: "2021-09-01T12:16:05.996504-07:00"
description: Control Agent for managing StreamSets Control Hub Deployments
digest: d4278297e91d2ea64bebc0498a1f2403dc74930132a6c67e39d9da33942a2488
home: https://streamsets.com
keywords:
- streamsets
- sdc
- sch
maintainers:
- email: thomas.ganka@streamsets.com
name: thomasganka
name: control-agent
sources:
- https://github.com/streamsets/helm-charts/tree/master/incubating/control-agent
urls:
- assets/streamsets/control-agent-2.0.101.tgz
version: 2.0.101
- annotations:
catalog.cattle.io/certified: partner
catalog.cattle.io/release-name: streamsets