push helm Charts and kube Components
This commit is contained in:
parent
accee4fdd0
commit
00d92b73f8
5
Helm/oc-catalog/Chart.yaml
Normal file
5
Helm/oc-catalog/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: oc-catalog
|
||||||
|
description: A Helm chart for deploying the oc-catalog application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0"
|
12
Helm/oc-catalog/templates/service.yml
Normal file
12
Helm/oc-catalog/templates/service.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-oc-catalog
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: {{ .Chart.Name }}
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: {{ .Values.service.targetPort }}
|
||||||
|
type: {{ .Values.service.type }}
|
33
Helm/oc-catalog/templates/statefulset.yml
Normal file
33
Helm/oc-catalog/templates/statefulset.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-oc-catalog
|
||||||
|
labels:
|
||||||
|
app: oc-catalog
|
||||||
|
spec:
|
||||||
|
serviceName: "{{ .Release.Name }}-oc-catalog"
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: oc-catalog
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: oc-catalog
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: oc-catalog
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: MONGO_DATABASE
|
||||||
|
value: "DC_myDC"
|
||||||
|
- name: MONGO_URI
|
||||||
|
value: "mongodb://mongo:27017"
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
{{- range .Values.imagePullSecrets }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
19
Helm/oc-catalog/values.yaml
Normal file
19
Helm/oc-catalog/values.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: registry.dev.svc.cluster.local:5000/oc-catalog
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: NodePort
|
||||||
|
port: 8087
|
||||||
|
targetPort: 8080
|
||||||
|
|
||||||
|
mongo:
|
||||||
|
database: DC_myDC
|
||||||
|
uri: mongodb://mongo:27017
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
|
|
23
Helm/oc-deploy/.helmignore
Normal file
23
Helm/oc-deploy/.helmignore
Normal file
@ -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
Helm/oc-deploy/Chart.lock
Normal file
12
Helm/oc-deploy/Chart.lock
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
dependencies:
|
||||||
|
- name: oc-mongo
|
||||||
|
repository: file://../oc-mongo
|
||||||
|
version: 0.1.0
|
||||||
|
- name: oc-mongo-express
|
||||||
|
repository: file://../oc-mongo-express
|
||||||
|
version: 0.1.0
|
||||||
|
- name: oc-catalog
|
||||||
|
repository: file://../oc-catalog
|
||||||
|
version: 0.1.0
|
||||||
|
digest: sha256:036af8acf7fe0a73f039776d13f63aeb7530e7a8b0febb49fd5e8415ac6672c6
|
||||||
|
generated: "2024-08-27T14:34:41.6038407+02:00"
|
14
Helm/oc-deploy/Chart.yaml
Normal file
14
Helm/oc-deploy/Chart.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: oc-deploy
|
||||||
|
description: A Helm chart to deploy oc-mongo, oc-mongo-express, and oc-catalog together
|
||||||
|
version: 0.1.0
|
||||||
|
dependencies:
|
||||||
|
- name: oc-mongo
|
||||||
|
version: 0.1.0
|
||||||
|
repository: "file://../oc-mongo"
|
||||||
|
- name: oc-mongo-express
|
||||||
|
version: 0.1.0
|
||||||
|
repository: "file://../oc-mongo-express"
|
||||||
|
- name: oc-catalog
|
||||||
|
version: 0.1.0
|
||||||
|
repository: "file://../oc-catalog"
|
BIN
Helm/oc-deploy/charts/oc-catalog-0.1.0.tgz
Normal file
BIN
Helm/oc-deploy/charts/oc-catalog-0.1.0.tgz
Normal file
Binary file not shown.
5
Helm/oc-deploy/charts/oc-catalog/Chart.yaml
Normal file
5
Helm/oc-deploy/charts/oc-catalog/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: oc-catalog
|
||||||
|
description: A Helm chart for deploying the oc-catalog application
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0"
|
12
Helm/oc-deploy/charts/oc-catalog/templates/service.yml
Normal file
12
Helm/oc-deploy/charts/oc-catalog/templates/service.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: oc-catalog
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: {{ .Chart.Name }}
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: {{ .Values.service.targetPort }}
|
||||||
|
type: {{ .Values.service.type }}
|
33
Helm/oc-deploy/charts/oc-catalog/templates/statefulset.yml
Normal file
33
Helm/oc-deploy/charts/oc-catalog/templates/statefulset.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-oc-catalog
|
||||||
|
labels:
|
||||||
|
app: oc-catalog
|
||||||
|
spec:
|
||||||
|
serviceName: "oc-catalog"
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: oc-catalog
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: oc-catalog
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: oc-catalog
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: MONGO_DATABASE
|
||||||
|
value: "DC_myDC"
|
||||||
|
- name: MONGO_URI
|
||||||
|
value: "mongodb://{{ .Release.Name }}-mongo:27017"
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
{{- range .Values.imagePullSecrets }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
19
Helm/oc-deploy/charts/oc-catalog/values.yaml
Normal file
19
Helm/oc-deploy/charts/oc-catalog/values.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: registry.dev.svc.cluster.local:5000/oc-catalog
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: NodePort
|
||||||
|
port: 8087
|
||||||
|
targetPort: 8080
|
||||||
|
|
||||||
|
mongo:
|
||||||
|
database: DC_myDC
|
||||||
|
uri: mongodb://oc-deploy-mongo:27017
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
|
|
BIN
Helm/oc-deploy/charts/oc-mongo-0.1.0.tgz
Normal file
BIN
Helm/oc-deploy/charts/oc-mongo-0.1.0.tgz
Normal file
Binary file not shown.
BIN
Helm/oc-deploy/charts/oc-mongo-express-0.1.0.tgz
Normal file
BIN
Helm/oc-deploy/charts/oc-mongo-express-0.1.0.tgz
Normal file
Binary file not shown.
5
Helm/oc-deploy/charts/oc-mongo-express/Chart.yaml
Normal file
5
Helm/oc-deploy/charts/oc-mongo-express/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: oc-mongo-express
|
||||||
|
description: A Helm chart for deploying mongo-express
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0"
|
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongo-express
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongo-express
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: {{ .Values.service.targetPort }}
|
||||||
|
type: {{ .Values.service.type }}
|
@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-mongo-express
|
||||||
|
labels:
|
||||||
|
app: mongo-express
|
||||||
|
spec:
|
||||||
|
serviceName: "mongo-express"
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongo-express
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongo-express
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongo-express
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.service.targetPort }}
|
||||||
|
env:
|
||||||
|
- name: ME_CONFIG_BASICAUTH_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mongo-secret
|
||||||
|
key: {{ .Values.secret.usernameKey }}
|
||||||
|
- name: ME_CONFIG_BASICAUTH_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mongo-secret
|
||||||
|
key: {{ .Values.secret.passwordKey }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
{{- range .Values.imagePullSecrets }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
18
Helm/oc-deploy/charts/oc-mongo-express/values.yaml
Normal file
18
Helm/oc-deploy/charts/oc-mongo-express/values.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: mongo-express
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
port: 8081
|
||||||
|
targetPort: 8081
|
||||||
|
type: NodePort
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: my-registry-key
|
||||||
|
|
||||||
|
secret:
|
||||||
|
usernameKey: mongo-username
|
||||||
|
passwordKey: mongo-password
|
5
Helm/oc-deploy/charts/oc-mongo/Chart.yaml
Normal file
5
Helm/oc-deploy/charts/oc-mongo/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: oc-mongo
|
||||||
|
description: A Helm chart for deploying the oc-mongo component
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0"
|
10
Helm/oc-deploy/charts/oc-mongo/templates/pvc.yaml
Normal file
10
Helm/oc-deploy/charts/oc-mongo/templates/pvc.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.persistence.name }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.accessMode }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size }}
|
8
Helm/oc-deploy/charts/oc-mongo/templates/secret.yaml
Normal file
8
Helm/oc-deploy/charts/oc-mongo/templates/secret.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-mongo-secret
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
username: {{ .Values.secret.username }}
|
||||||
|
password: {{ .Values.secret.password }}
|
11
Helm/oc-deploy/charts/oc-mongo/templates/service.yaml
Normal file
11
Helm/oc-deploy/charts/oc-mongo/templates/service.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongo
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongo
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: {{ .Values.service.port }}
|
31
Helm/oc-deploy/charts/oc-mongo/templates/statefulset.yaml
Normal file
31
Helm/oc-deploy/charts/oc-mongo/templates/statefulset.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-mongo
|
||||||
|
labels:
|
||||||
|
app: mongo
|
||||||
|
spec:
|
||||||
|
serviceName: "mongo"
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongo
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
mountPath: /data/db
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
mountPath: /data/configdb
|
||||||
|
volumes:
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.name }}
|
19
Helm/oc-deploy/charts/oc-mongo/values.yaml
Normal file
19
Helm/oc-deploy/charts/oc-mongo/values.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: mongo
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
port: 27017
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
name: mongo-pvc-helm
|
||||||
|
enabled: true
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 1Gi
|
||||||
|
|
||||||
|
secret:
|
||||||
|
username: dGVzdA== # base64 encoding of 'test'
|
||||||
|
password: dGVzdA== # base64 encoding of 'test'
|
48
Helm/oc-deploy/values.yaml
Normal file
48
Helm/oc-deploy/values.yaml
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
oc-mongo:
|
||||||
|
replicaCount: 1
|
||||||
|
image:
|
||||||
|
repository: registry.dev.svc.cluster.local:5000/mongo
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
service:
|
||||||
|
port: 27017
|
||||||
|
persistence:
|
||||||
|
name: mongo-pvc-helm
|
||||||
|
enabled: true
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 1Gi
|
||||||
|
secret:
|
||||||
|
username: dGVzdA== # base64 encoding of 'test'
|
||||||
|
password: dGVzdA== # base64 encoding of 'test'
|
||||||
|
|
||||||
|
oc-mongo-express:
|
||||||
|
replicaCount: 1
|
||||||
|
image:
|
||||||
|
repository: registry.dev.svc.cluster.local:5000/mongo-express
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
service:
|
||||||
|
port: 8081
|
||||||
|
targetPort: 8081
|
||||||
|
type: NodePort
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
||||||
|
secret:
|
||||||
|
usernameKey: mongo-username
|
||||||
|
passwordKey: mongo-password
|
||||||
|
|
||||||
|
oc-catalog:
|
||||||
|
replicaCount: 1
|
||||||
|
image:
|
||||||
|
repository: registry.dev.svc.cluster.local:5000/oc-catalog
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
service:
|
||||||
|
type: NodePort
|
||||||
|
port: 8087
|
||||||
|
targetPort: 8080
|
||||||
|
mongo:
|
||||||
|
database: DC_myDC
|
||||||
|
uri: mongodb://oc-catalog-mongo:27017
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
5
Helm/oc-mongo-express/Chart.yaml
Normal file
5
Helm/oc-mongo-express/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: oc-mongo-express
|
||||||
|
description: A Helm chart for deploying mongo-express
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0"
|
12
Helm/oc-mongo-express/templates/service.yaml
Normal file
12
Helm/oc-mongo-express/templates/service.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-mongo-express
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongo-express
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: {{ .Values.service.targetPort }}
|
||||||
|
type: {{ .Values.service.type }}
|
39
Helm/oc-mongo-express/templates/statefulset.yaml
Normal file
39
Helm/oc-mongo-express/templates/statefulset.yaml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-mongo-express
|
||||||
|
labels:
|
||||||
|
app: mongo-express
|
||||||
|
spec:
|
||||||
|
serviceName: "{{ .Release.Name }}-mongo-express"
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongo-express
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongo-express
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongo-express
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: {{ .Values.service.targetPort }}
|
||||||
|
env:
|
||||||
|
- name: ME_CONFIG_BASICAUTH_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mongo-secret
|
||||||
|
key: {{ .Values.secret.usernameKey }}
|
||||||
|
- name: ME_CONFIG_BASICAUTH_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mongo-secret
|
||||||
|
key: {{ .Values.secret.passwordKey }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
{{- range .Values.imagePullSecrets }}
|
||||||
|
- name: {{ .name }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
18
Helm/oc-mongo-express/values.yaml
Normal file
18
Helm/oc-mongo-express/values.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: mongo-express
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
port: 8081
|
||||||
|
targetPort: 8081
|
||||||
|
type: NodePort
|
||||||
|
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: my-registry-key
|
||||||
|
|
||||||
|
secret:
|
||||||
|
usernameKey: mongo-username
|
||||||
|
passwordKey: mongo-password
|
5
Helm/oc-mongo/Chart.yaml
Normal file
5
Helm/oc-mongo/Chart.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
apiVersion: v2
|
||||||
|
name: oc-mongo
|
||||||
|
description: A Helm chart for deploying the oc-mongo component
|
||||||
|
version: 0.1.0
|
||||||
|
appVersion: "1.0"
|
10
Helm/oc-mongo/templates/pvc.yaml
Normal file
10
Helm/oc-mongo/templates/pvc.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.persistence.name }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.accessMode }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size }}
|
8
Helm/oc-mongo/templates/secret.yaml
Normal file
8
Helm/oc-mongo/templates/secret.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-mongo-secret
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
username: {{ .Values.secret.username }}
|
||||||
|
password: {{ .Values.secret.password }}
|
11
Helm/oc-mongo/templates/service.yaml
Normal file
11
Helm/oc-mongo/templates/service.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongo
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongo
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
targetPort: {{ .Values.service.port }}
|
31
Helm/oc-mongo/templates/statefulset.yaml
Normal file
31
Helm/oc-mongo/templates/statefulset.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: StatefulSet
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-mongo
|
||||||
|
labels:
|
||||||
|
app: mongo
|
||||||
|
spec:
|
||||||
|
serviceName: "{{ .Release.Name }}-mongo"
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongo
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
mountPath: /data/db
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
mountPath: /data/configdb
|
||||||
|
volumes:
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ .Values.persistence.name }}
|
19
Helm/oc-mongo/values.yaml
Normal file
19
Helm/oc-mongo/values.yaml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: mongo
|
||||||
|
tag: latest
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
service:
|
||||||
|
port: 27017
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
name: mongo-pvc-helm
|
||||||
|
enabled: true
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 1Gi
|
||||||
|
|
||||||
|
secret:
|
||||||
|
username: dGVzdA== # base64 encoding of 'test'
|
||||||
|
password: dGVzdA== # base64 encoding of 'test'
|
29
oc-catalog/oc-catalog-deployment.yml
Normal file
29
oc-catalog/oc-catalog-deployment.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# oc-catalog-deployment.yml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: oc-catalog
|
||||||
|
labels:
|
||||||
|
app: oc-catalog
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: oc-catalog
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: oc-catalog
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: oc-catalog
|
||||||
|
image: registry.dev.svc.cluster.local:5000/oc-catalog:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: MONGO_DATABASE
|
||||||
|
value: "DC_myDC"
|
||||||
|
- name: MONGO_URI
|
||||||
|
value: "mongodb://mongo:27017"
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: regcred
|
13
oc-catalog/oc-catalog-service.yml
Normal file
13
oc-catalog/oc-catalog-service.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# oc-catalog-service.yml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: oc-catalog
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: oc-catalog
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8087
|
||||||
|
targetPort: 8080
|
||||||
|
type: NodePort # Optional, useful for accessing via Minikube IP and NodePort
|
32
oc-mongo/mongo-express/mongo-express-deployment.yml
Normal file
32
oc-mongo/mongo-express/mongo-express-deployment.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mongo-express
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongo-express
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongo-express
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongo-express
|
||||||
|
image: mongo-express:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 8081
|
||||||
|
env:
|
||||||
|
- name: ME_CONFIG_BASICAUTH_USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mongo-secret
|
||||||
|
key: mongo-username
|
||||||
|
- name: ME_CONFIG_BASICAUTH_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: mongo-secret
|
||||||
|
key: mongo-password
|
||||||
|
imagePullSecrets:
|
||||||
|
- name: my-registry-key
|
13
oc-mongo/mongo-express/mongo-express-service.yml
Normal file
13
oc-mongo/mongo-express/mongo-express-service.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# mongo-express-service.yml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongo-express
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongo-express
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 8081
|
||||||
|
targetPort: 8081
|
||||||
|
type: NodePort # Optional, useful for accessing via Minikube IP and NodePort
|
42
oc-mongo/mongo/mongo-deployment.yml
Normal file
42
oc-mongo/mongo/mongo-deployment.yml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# mongo-deployment.yml
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mongo
|
||||||
|
labels:
|
||||||
|
app: mongo
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mongo
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mongo
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mongo
|
||||||
|
image: mongo:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 27017
|
||||||
|
volumeMounts:
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
mountPath: /data/db
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
mountPath: /data/configdb
|
||||||
|
volumes:
|
||||||
|
- name: mongo-persistent-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mongo-pvc
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mongo-pvc
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
9
oc-mongo/mongo/mongo-secret.yml
Normal file
9
oc-mongo/mongo/mongo-secret.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# mongo-secret.yml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: mongo-secret
|
||||||
|
type: Opaque
|
||||||
|
data:
|
||||||
|
username: dGVzdA== # base64 encoding of 'test'
|
||||||
|
password: dGVzdA== # base64 encoding of 'test'
|
12
oc-mongo/mongo/mongo-service.yml
Normal file
12
oc-mongo/mongo/mongo-service.yml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# mongo-service.yml
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mongo
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: mongo
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 27017
|
||||||
|
targetPort: 27017
|
Loading…
Reference in New Issue
Block a user