From fd5b18f88cbc93260a54ded756089a0e3b601c7a Mon Sep 17 00:00:00 2001 From: Jonathan Ervine Date: Fri, 24 Jul 2020 10:58:58 +0800 Subject: [PATCH] Adding slack2chat chart --- slack2chat/.helmignore | 22 ++++++ slack2chat/Chart.yaml | 24 ++++++ slack2chat/slack2chat-0.1.0.tgz | Bin 0 -> 2929 bytes slack2chat/templates/NOTES.txt | 21 ++++++ slack2chat/templates/_helpers.tpl | 63 ++++++++++++++++ slack2chat/templates/deployment.yaml | 55 ++++++++++++++ slack2chat/templates/ingress.yaml | 41 +++++++++++ slack2chat/templates/service.yaml | 15 ++++ slack2chat/templates/serviceaccount.yaml | 8 ++ .../templates/tests/test-connection.yaml | 15 ++++ slack2chat/values.yaml | 69 ++++++++++++++++++ 11 files changed, 333 insertions(+) create mode 100644 slack2chat/.helmignore create mode 100644 slack2chat/Chart.yaml create mode 100644 slack2chat/slack2chat-0.1.0.tgz create mode 100644 slack2chat/templates/NOTES.txt create mode 100644 slack2chat/templates/_helpers.tpl create mode 100644 slack2chat/templates/deployment.yaml create mode 100644 slack2chat/templates/ingress.yaml create mode 100644 slack2chat/templates/service.yaml create mode 100644 slack2chat/templates/serviceaccount.yaml create mode 100644 slack2chat/templates/tests/test-connection.yaml create mode 100644 slack2chat/values.yaml diff --git a/slack2chat/.helmignore b/slack2chat/.helmignore new file mode 100644 index 0000000..50af031 --- /dev/null +++ b/slack2chat/.helmignore @@ -0,0 +1,22 @@ +# 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 +.vscode/ diff --git a/slack2chat/Chart.yaml b/slack2chat/Chart.yaml new file mode 100644 index 0000000..4187f5e --- /dev/null +++ b/slack2chat/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v2 +name: slack2chat +description: A Helm chart for Kubernetes + +# 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. +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. +appVersion: 14.5.0 + +# This is the location of the application icon +icon: https://git.ervine.org/jonny/x86_64-alpine-slack2chat/raw/branch/master/public/slack2chat.png diff --git a/slack2chat/slack2chat-0.1.0.tgz b/slack2chat/slack2chat-0.1.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..ee09d6d58110a32b77b9c5303bbf209293e316d1 GIT binary patch literal 2929 zcmV-%3y$<3iwG0|00000|0w_~VMtOiV@ORlOnEsqVl!4SWK%V1T2nbTPgYhoO;>Dc zVQyr3R8em|NM&qo0PI`;Z`(Ms-=FnY%u~DQm$#f59mvKd%^Znqv`grD2jrX z#x@&@)RL4FpPT#J4GllJ0_rM3?`NS5$TaAxNigh$y;p>CX^Sb{{R5k;QzhoV87}A2hriq z|L>yF;gAVtrZLQ}gJHqB^{_V+REnh-Ll_1uqa%z1fV|+mFF8x5F`N$1r0FZvC`|qafU(rZ(RSQp>=CMiS2W8x5-t8fDM7X z_aQ@x)ue=FxW0B2ii#1!Lkq|dAFoh5%(k=u3u@v3+P}4-#3HQchgTMO;q1-J zSD*TC-o872`1qn2U}89o&_JhSu~p|ZL9j}^MUGS>Ih((|zJ`v3&sqvQ+T(CWbdCwJ zT=j?OBN3$%*CCYBwdKS_!iy9ktOdo@mL0mmK51xo+HdG)IqPrIkQvOJa@tT+XhPG} z&IG!5<(KQwDUgh%o4dH%eORgyKb%`@jp1KQn*KlKR3xZwGClxUc#7fFKt`uv=mi3W zAznhpL}5_7bBSHhb(V122P0vCKqr)OyH1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7`OnyLR`jb^otG`fm3B=OT;fhIlj-hIVrr$gyww-yGj?l~brEkgc z9Q^rE_9p)?^ZVZo1DpJRf2IEathcwn^Z&bOTNhw%0*aD+d%UehXkw)k?m)#l%6ESvB< ze7fau8&=l}#!_B{F*s?uND_N4uL6f=k)X&RU;h(e0a2#1#YNqO2OU_hD{xh7Qx;MzG`9HCyWg{UK-mZ*|@&DdY^Z);L z{(nd90raUcsDuV1!OuQij#0p%U_51F1UXGE=m<3l9>BXX)1Zso#oeIC$T^I-9Qbl8 z6QiF%A*Y5-&}BSo@2NPI6G#H` z^8C}ekqUzcP+muRe{v2fQ#v3cX1eavs~?cTzf{+KRxie*uKlRK>WSzs7!7E0QRMFK zqYj=DeVGSO$$(x2Pl?I$;OW1E2k@RMCJPOxFJI|^=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "slack2chat.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + backend: + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} +{{- end }} diff --git a/slack2chat/templates/service.yaml b/slack2chat/templates/service.yaml new file mode 100644 index 0000000..1853cc7 --- /dev/null +++ b/slack2chat/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "slack2chat.fullname" . }} + labels: + {{- include "slack2chat.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "slack2chat.selectorLabels" . | nindent 4 }} diff --git a/slack2chat/templates/serviceaccount.yaml b/slack2chat/templates/serviceaccount.yaml new file mode 100644 index 0000000..38aca4c --- /dev/null +++ b/slack2chat/templates/serviceaccount.yaml @@ -0,0 +1,8 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "slack2chat.serviceAccountName" . }} + labels: +{{ include "slack2chat.labels" . | nindent 4 }} +{{- end -}} diff --git a/slack2chat/templates/tests/test-connection.yaml b/slack2chat/templates/tests/test-connection.yaml new file mode 100644 index 0000000..0ae4811 --- /dev/null +++ b/slack2chat/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "slack2chat.fullname" . }}-test-connection" + labels: +{{ include "slack2chat.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test-success +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "slack2chat.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/slack2chat/values.yaml b/slack2chat/values.yaml new file mode 100644 index 0000000..ebce3c7 --- /dev/null +++ b/slack2chat/values.yaml @@ -0,0 +1,69 @@ +# Default values for slack2chat. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: harbor.ervine.dev/public/x86_64/alpine/slack2chat + pullPolicy: IfNotPresent + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: + # capabilities: + # drop: + # - ALL + readOnlyRootFilesystem: true + runAsNonRoot: true + runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +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: 20m + # memory: 64Mi + # requests: + # cpu: 10m + # memory: 32Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +slack2chat: {} +