Skip to content

Commit

Permalink
Merge pull request #7 from osodevops/eventcatalog
Browse files Browse the repository at this point in the history
helm chart deployed and tests on aws eks cluster with a valid domain …
  • Loading branch information
MrDevopsman authored Nov 29, 2024
2 parents 5595600 + 83deaa1 commit b841b35
Show file tree
Hide file tree
Showing 6 changed files with 153 additions and 0 deletions.
23 changes: 23 additions & 0 deletions charts/eventcatalog/.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/
8 changes: 8 additions & 0 deletions charts/eventcatalog/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v2
name: eventcatalog
description: A Helm chart for deploying EventCatalog's static site
type: application
version: 0.1.0
appVersion: "1.0.1"
maintainers:
- name: oso
23 changes: 23 additions & 0 deletions charts/eventcatalog/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ .Chart.Name }}
template:
metadata:
labels:
app: {{ .Chart.Name }}
spec:
containers:
- name: {{.Values.image.name}}
image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}
ports:
- containerPort: {{ .Values.service.port }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
51 changes: 51 additions & 0 deletions charts/eventcatalog/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Chart.Name }}
annotations:
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.ingressClass }}
{{- if and .Values.ingress.domain (not (empty .Values.ingress.hosts)) }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ $.Chart.Name }} # Accessing chart name globally
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- end }}
{{- else }}
# If no domain, use default path without host
rules:
- http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
service:
name: {{ .Chart.Name }}
port:
number: {{ $.Values.service.port }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
{{- end }}
13 changes: 13 additions & 0 deletions charts/eventcatalog/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: 80
selector:
app: {{ .Chart.Name }}
35 changes: 35 additions & 0 deletions charts/eventcatalog/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
replicaCount: 1
image:
name: eventcatalog
# Container image with static EventCatalog demo built
repository: quay.io/osodevops/eventcatalog
# If not specified, defaults to .Chart.AppVersion
tag: ""
pullPolicy: IfNotPresent
service:
type: ClusterIP
# Default port for the service
port: 80
ingress:
enabled: true
domain: true
ingressClass: nginx
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: example.com
paths:
- path: /
pathType: ImplementationSpecific
tls:
- secretName: test-eventcatalog
hosts:
- example.com
resources:
requests:
memory: "256Mi"
cpu: "500m"
limits:
memory: "512Mi"
cpu: "1"

0 comments on commit b841b35

Please sign in to comment.