Skip to content

Commit

Permalink
Add addons, demos, and system
Browse files Browse the repository at this point in the history
Signed-off-by: Dhi Aurrahman <[email protected]>
  • Loading branch information
dio committed Jan 23, 2024
1 parent f72301f commit 4c3f72e
Show file tree
Hide file tree
Showing 26 changed files with 796 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
# Tetrate Istio Distribution Helm Charts

## Usage

[Helm](https://helm.sh) must be installed to use the charts.
Please refer to Helm's [documentation](https://helm.sh/docs/) to get started.

Once Helm is set up properly, add the repository as follows:

```console
helm repo add tetratelabs https://tetratelabs.github.io/helm-charts
```

You can then run `helm search repo tetratelabs` to see the charts.

> [!NOTE]
> To list down all versions, you need to provide the `-l` and `--devel` flags.
> It is recommended to migrate to the newer charts repo: https://tis.tetrate.io/charts.
23 changes: 23 additions & 0 deletions charts/addons/istio-registry-sync/.helmignore
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/
19 changes: 19 additions & 0 deletions charts/addons/istio-registry-sync/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v2
name: istio-registry-sync
description: Helm chart for deploying Istio Registry Sync

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.5

# 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: v0.5.2

annotations:
tetrate.io/addon: "true"
33 changes: 33 additions & 0 deletions charts/addons/istio-registry-sync/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# istio-registry-sync

![Version: 0.1.5](https://img.shields.io/badge/Version-0.1.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.5.2](https://img.shields.io/badge/AppVersion-v0.5.2-informational?style=flat-square)

Helm chart for deploying Istio Registry Sync

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| cloudmap.region | string | `""` | AWS Region to use to connect to Cloud Map |
| consul.endpoint | string | `""` | Consul's endpoint to query service catalog |
| consul.namespace | string | `""` | Consul's namespace to search service catalog |
| consul.token | string | `""` | Consul's ACL token to access service catalog |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"addon-containers.istio.tetratelabs.com/istio-registry-sync"` | |
| image.tag | string | `"v0.5.1"` | |
| imagePullSecrets | list | `[]` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| publishNamespace | string | `""` | Istio Registry Sync publishes ServiceEntry into this namespace or the namespace it is deployed into |
| resources | object | `{}` | |
| resyncPeriod | int | `5` | Interval in seconds between syncing |
| securityContext | object | `{}` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | |

Empty file.
63 changes: 63 additions & 0 deletions charts/addons/istio-registry-sync/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "istio-registry-sync.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 "istio-registry-sync.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 "istio-registry-sync.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "istio-registry-sync.labels" -}}
helm.sh/chart: {{ include "istio-registry-sync.chart" . }}
{{ include "istio-registry-sync.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/part-of: tis
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "istio-registry-sync.selectorLabels" -}}
app.kubernetes.io/name: {{ include "istio-registry-sync.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "istio-registry-sync.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "istio-registry-sync.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
74 changes: 74 additions & 0 deletions charts/addons/istio-registry-sync/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "istio-registry-sync.fullname" . }}
labels:
{{- include "istio-registry-sync.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "istio-registry-sync.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "istio-registry-sync.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "istio-registry-sync.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
args:
- serve
{{- if .Values.consul.endpoint }}
- --consul-endpoint={{ .Values.consul.endpoint }}
{{- end }}
{{- if .Values.consul.token }}
- --consul-token={{ .Values.consul.token }}
{{- end }}
{{- if .Values.consul.namespace }}
- --consul-namespace={{ .Values.consul.namespace }}
{{- end }}
{{- if .Values.resyncPeriod }}
- --resync-period={{ .Values.resyncPeriod }}
{{- end }}
env:
- name: PUBLISH_NAMESPACE
{{- if .Values.publishNamespace }}
value: {{ .Values.publishNamespace }}
{{ else }}
valueFrom:
fieldRef:
fieldPath: metadata.namespace
{{- end }}
{{- if .Values.cloudmap.region }}
- name: AWS_REGION
value: {{ .Values.cloudmap.region }}
{{- 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 }}
28 changes: 28 additions & 0 deletions charts/addons/istio-registry-sync/templates/rbac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ include "istio-registry-sync.fullname" . }}-cluster-role
labels:
{{- include "istio-registry-sync.selectorLabels" . | nindent 4 }}
rules:
- apiGroups: ["networking.istio.io"]
resources: ["serviceentries"]
verbs: ["create", "get", "list", "watch", "patch", "delete", "update"]
- apiGroups: [""]
resources: ["services"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ include "istio-registry-sync.fullname" . }}-rolebinding
labels:
{{- include "istio-registry-sync.selectorLabels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "istio-registry-sync.fullname" . }}-cluster-role
subjects:
- kind: ServiceAccount
name: {{ include "istio-registry-sync.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
12 changes: 12 additions & 0 deletions charts/addons/istio-registry-sync/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "istio-registry-sync.serviceAccountName" . }}
labels:
{{- include "istio-registry-sync.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
51 changes: 51 additions & 0 deletions charts/addons/istio-registry-sync/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# -- Istio Registry Sync publishes ServiceEntry into this namespace or the namespace it is deployed into
publishNamespace: ""

# -- Interval in seconds between syncing
resyncPeriod: 5

cloudmap:
# -- AWS Region to use to connect to Cloud Map
region: ""

consul:
# -- Consul's namespace to search service catalog
namespace: ""
# -- Consul's endpoint to query service catalog
endpoint: ""
# -- Consul's ACL token to access service catalog
token: ""

image:
repository: addon-containers.istio.tetratelabs.com/istio-registry-sync
pullPolicy: IfNotPresent
tag: v0.5.1

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

serviceAccount:
create: true
# Example of how to associate AWS IAM role with ServiceAccount for AWS Cloud Map integration
# https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html
# annotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::819220072900:role/cloudmap-read
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: {}

securityContext: {}

resources: {}

nodeSelector: {}

tolerations: []

affinity: {}
23 changes: 23 additions & 0 deletions charts/demos/istio-monitoring-demo/.helmignore
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/
12 changes: 12 additions & 0 deletions charts/demos/istio-monitoring-demo/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
dependencies:
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 6.58.4
- name: prometheus
repository: https://prometheus-community.github.io/helm-charts
version: 19.6.1
- name: kube-state-metrics
repository: https://prometheus-community.github.io/helm-charts
version: 5.14.0
digest: sha256:b7d61f82199fa993f213d2e05ec3034d353291c36b8891f412a5adc0d93fbb27
generated: "2023-10-16T16:28:28.372508+08:00"
Loading

0 comments on commit 4c3f72e

Please sign in to comment.