Skip to content

Commit

Permalink
Adds: Kubernetes
Browse files Browse the repository at this point in the history
Fixes: Openshift descriptors
  • Loading branch information
b23prodtm committed Jul 16, 2020
1 parent 1f9a1bb commit aa2d72d
Show file tree
Hide file tree
Showing 21 changed files with 833 additions and 1,472 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#################################################
.env
*.old
*.yaml
*.armhf
*.aarch64
*.x86_64
Expand Down
14 changes: 14 additions & 0 deletions kubernetes/acake2php-data-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: acake2php-data
name: acake2php-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
14 changes: 14 additions & 0 deletions kubernetes/acake2php-db-data-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: acake2php-db-data
name: acake2php-db-data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
14 changes: 14 additions & 0 deletions kubernetes/acake2php-db-socket-persistentvolumeclaim.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
creationTimestamp: null
labels:
io.kompose.service: acake2php-db-socket
name: acake2php-db-socket
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
status: {}
92 changes: 92 additions & 0 deletions kubernetes/acake2php-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
io.balena.features.dbus: "1"
kompose.cmd: kompose convert -f docker-compose.x86_64 --out kubernetes/
kompose.version: 1.21.0 (992df58d8)
creationTimestamp: null
labels:
io.kompose.service: acake2php
name: acake2php
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: acake2php
strategy:
type: Recreate
template:
metadata:
annotations:
io.balena.features.dbus: "1"
kompose.cmd: kompose convert -f docker-compose.x86_64 --out kubernetes/
kompose.version: 1.21.0 (992df58d8)
creationTimestamp: null
labels:
io.kompose.network/acake2php_cake: "true"
io.kompose.service: acake2php
spec:
containers:
- env:
- name: BALENA_MACHINE_NAME
value: raspberrypi3
- name: BALENA_PROJECTS
value: '(. ./mysqldb ./deployment/images/node-php7 ./deployment/images/apache-php7)
#(submodule deployment/images/primary'
- name: BALENA_PROJECTS_FLAGS
value: (IMG_TAG PRIMARY_HUB SECONDARY_HUB)
- name: CAKEPHP_DEBUG_LEVEL
value: "1"
- name: CAKEPHP_SECURITY_CIPHER_SEED
value: "01234"
- name: CAKEPHP_SECURITY_SALT
value: Word
- name: COLLECT_COVERAGE
value: "false"
- name: DATABASE_USER
value: root
- name: DKR_ARCH
value: armhf
- name: HTTPD_LISTEN
value: '*:80'
- name: IMG_TAG
value: latest
- name: MYPHPCMS_DIR
value: app/webroot/php_cms
- name: MYPHPCMS_LOG
value: app/tmp/logs
- name: PGID
value: "1000"
- name: PRIMARY_HUB
value: betothreeprod/apache-php7
- name: PUID
value: "1000"
- name: SECONDARY_HUB
value: betothreeprod/mariadb-raspberrypi3
- name: SERVER_NAME
value: acake2php.local
- name: TZ
value: Europe/Paris
image: betothreeprod/acake2php-intel-nuc
imagePullPolicy: ""
name: acake2php
ports:
- containerPort: 80
- containerPort: 443
resources: {}
volumeMounts:
- mountPath: /var/www
name: acake2php-data
- mountPath: /var/run/mysqld
name: acake2php-db-socket
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: acake2php-data
persistentVolumeClaim:
claimName: acake2php-data
- name: acake2php-db-socket
persistentVolumeClaim:
claimName: acake2php-db-socket
status: {}
23 changes: 23 additions & 0 deletions kubernetes/acake2php-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: v1
kind: Service
metadata:
annotations:
io.balena.features.dbus: "1"
kompose.cmd: kompose convert -f docker-compose.x86_64 --out kubernetes/
kompose.version: 1.21.0 (992df58d8)
creationTimestamp: null
labels:
io.kompose.service: acake2php
name: acake2php
spec:
ports:
- name: "80"
port: 80
targetPort: 80
- name: "443"
port: 443
targetPort: 443
selector:
io.kompose.service: acake2php
status:
loadBalancer: {}
14 changes: 14 additions & 0 deletions kubernetes/acake2php_cake-networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
creationTimestamp: null
name: acake2php_cake
spec:
ingress:
- from:
- podSelector:
matchLabels:
io.kompose.network/acake2php_cake: "true"
podSelector:
matchLabels:
io.kompose.network/acake2php_cake: "true"
96 changes: 96 additions & 0 deletions kubernetes/db-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
io.balena.features.dbus: "1"
kompose.cmd: kompose convert -f docker-compose.x86_64 --out kubernetes/
kompose.version: 1.21.0 (992df58d8)
creationTimestamp: null
labels:
io.kompose.service: db
name: db
spec:
replicas: 1
selector:
matchLabels:
io.kompose.service: db
strategy:
type: Recreate
template:
metadata:
annotations:
io.balena.features.dbus: "1"
kompose.cmd: kompose convert -f docker-compose.x86_64 --out kubernetes/
kompose.version: 1.21.0 (992df58d8)
creationTimestamp: null
labels:
io.kompose.network/acake2php_cake: "true"
io.kompose.service: db
spec:
containers:
- env:
- name: BALENA_MACHINE_NAME
value: raspberrypi3
- name: BALENA_PROJECTS
value: '(. ./mysqldb ./deployment/images/node-php7 ./deployment/images/apache-php7)
#(submodule deployment/images/primary'
- name: BALENA_PROJECTS_FLAGS
value: (IMG_TAG PRIMARY_HUB SECONDARY_HUB)
- name: CAKEPHP_DEBUG_LEVEL
value: "1"
- name: CAKEPHP_SECURITY_CIPHER_SEED
value: "01234"
- name: CAKEPHP_SECURITY_SALT
value: Word
- name: COLLECT_COVERAGE
value: "false"
- name: DATABASE_USER
value: root
- name: DKR_ARCH
value: armhf
- name: HTTPD_LISTEN
value: '*:80'
- name: IMG_TAG
value: latest
- name: MYPHPCMS_DIR
value: app/webroot/php_cms
- name: MYPHPCMS_LOG
value: app/tmp/logs
- name: PGID
value: "1000"
- name: PRIMARY_HUB
value: betothreeprod/apache-php7
- name: PUID
value: "1000"
- name: SECONDARY_HUB
value: betothreeprod/mariadb-raspberrypi3
- name: SERVER_NAME
value: acake2php.local
- name: TZ
value: Europe/Paris
image: betothreeprod/mariadb-intel-nuc
imagePullPolicy: ""
name: db
ports:
- containerPort: 3306
resources: {}
volumeMounts:
- mountPath: /config
name: acake2php-db-data
- mountPath: /var/run/mysqld
name: acake2php-db-socket
- mountPath: /var/www
name: acake2php-data
restartPolicy: Always
serviceAccountName: ""
volumes:
- name: acake2php-db-data
persistentVolumeClaim:
claimName: acake2php-db-data
- name: acake2php-db-socket
persistentVolumeClaim:
claimName: acake2php-db-socket
- name: acake2php-data
persistentVolumeClaim:
claimName: acake2php-data
status: {}
20 changes: 20 additions & 0 deletions kubernetes/db-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
annotations:
io.balena.features.dbus: "1"
kompose.cmd: kompose convert -f docker-compose.x86_64 --out kubernetes/
kompose.version: 1.21.0 (992df58d8)
creationTimestamp: null
labels:
io.kompose.service: db
name: db
spec:
ports:
- name: "3306"
port: 3306
targetPort: 3306
selector:
io.kompose.service: db
status:
loadBalancer: {}
22 changes: 22 additions & 0 deletions openshift/templates/acake2php-data-persistentvolumeclaim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "acake2php-data",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "acake2php-data"
}
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "100Mi"
}
}
},
"status": {}
}
22 changes: 22 additions & 0 deletions openshift/templates/acake2php-db-data-persistentvolumeclaim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "acake2php-db-data",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "acake2php-db-data"
}
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "100Mi"
}
}
},
"status": {}
}
22 changes: 22 additions & 0 deletions openshift/templates/acake2php-db-socket-persistentvolumeclaim.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "acake2php-db-socket",
"creationTimestamp": null,
"labels": {
"io.kompose.service": "acake2php-db-socket"
}
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "100Mi"
}
}
},
"status": {}
}
Loading

0 comments on commit aa2d72d

Please sign in to comment.