-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ralph Soika <[email protected]>
- Loading branch information
Showing
6 changed files
with
319 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: office-workflow | ||
labels: | ||
app: office-workflow | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: office-workflow | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: office-workflow | ||
spec: | ||
containers: | ||
- env: | ||
- name: POSTGRES_CONNECTION | ||
value: jdbc:postgresql://db/office | ||
- name: POSTGRES_PASSWORD | ||
value: offiA111333 | ||
- name: POSTGRES_USER | ||
value: officeAdemo | ||
- name: TZ | ||
value: Europe/Berlin | ||
- name: WILDFLY_PASS | ||
value: imixs4.null | ||
image: imixs/imixs-office-workflow:latest | ||
name: office-workflow | ||
# run as root because of cephfs | ||
securityContext: | ||
runAsUser: 0 | ||
allowPrivilegeEscalation: false | ||
|
||
ports: | ||
- name: web | ||
containerPort: 8080 | ||
- name: admin | ||
containerPort: 9990 | ||
|
||
livenessProbe: | ||
httpGet: | ||
path: /health | ||
port: 9990 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 5 | ||
|
||
resources: {} | ||
volumeMounts: | ||
- mountPath: /home/imixs | ||
name: appdata | ||
restartPolicy: Always | ||
volumes: | ||
- name: appdata | ||
persistentVolumeClaim: | ||
claimName: appdata | ||
|
||
|
||
# Services | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: office-workflow | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
name: web | ||
port: 8080 | ||
selector: | ||
app: office-workflow | ||
|
||
|
||
|
||
# Persistence Volume Claim | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: appdata | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: longhorn | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: rbd-provisioner | ||
namespace: kube-system | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["persistentvolumes"] | ||
verbs: ["get", "list", "watch", "create", "delete"] | ||
- apiGroups: [""] | ||
resources: ["persistentvolumeclaims"] | ||
verbs: ["get", "list", "watch", "update"] | ||
- apiGroups: ["storage.k8s.io"] | ||
resources: ["storageclasses"] | ||
verbs: ["get", "list", "watch"] | ||
- apiGroups: [""] | ||
resources: ["events"] | ||
verbs: ["create", "update", "patch"] | ||
- apiGroups: [""] | ||
resources: ["services"] | ||
resourceNames: ["kube-dns","coredns"] | ||
verbs: ["list", "get"] | ||
- apiGroups: [""] | ||
resources: ["endpoints"] | ||
verbs: ["get", "list", "watch", "create", "update", "patch"] | ||
|
||
--- | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: rbd-provisioner | ||
subjects: | ||
- kind: ServiceAccount | ||
name: rdb-provisioner | ||
namespace: kube-system | ||
roleRef: | ||
kind: ClusterRole | ||
name: rbd-provisioner | ||
apiGroup: rbac.authorization.k8s.io | ||
|
||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: Role | ||
metadata: | ||
name: rbd-provisioner | ||
namespace: kube-system | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["secrets"] | ||
verbs: ["create", "get", "delete"] | ||
# - apiGroups: [""] | ||
# resources: ["endpoints"] | ||
# verbs: ["get", "list", "watch", "create", "update", "patch"] | ||
|
||
|
||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: RoleBinding | ||
metadata: | ||
name: rbd-provisioner | ||
namespace: kube-system | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: rbd-provisioner | ||
subjects: | ||
- kind: ServiceAccount | ||
name: rbd-provisioner | ||
namespace: kube-system | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: rbd-provisioner | ||
namespace: kube-system | ||
|
||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: rbd-provisioner | ||
namespace: kube-system | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: rbd-provisioner | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: rbd-provisioner | ||
spec: | ||
containers: | ||
- name: rbd-provisioner | ||
image: "quay.io/external_storage/rbd-provisioner:latest" | ||
env: | ||
- name: PROVISIONER_NAME | ||
value: ceph.com/rbd | ||
- name: PROVISIONER_SECRET_NAMESPACE | ||
value: kube-system | ||
# command: | ||
# - "/usr/local/bin/cephfs-provisioner" | ||
# args: | ||
# - "-id=cephfs-provisioner-1" | ||
serviceAccount: rbd-provisioner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# The <cluster-id> is used by the CSI plugin to uniquely identify and use a | ||
# Ceph cluster, the value MUST match the value provided as `clusterID` in the | ||
# StorageClass | ||
# The <MONValue#> fields are the various monitor addresses for the Ceph cluster | ||
# identified by the <cluster-id> | ||
# | ||
# To get both the Ceph cluster unique fsid and the monitor addresses run: | ||
# $ ceph mon dump | ||
--- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: csi-rbd-sc | ||
provisioner: rbd.csi.ceph.com | ||
parameters: | ||
clusterID: <cluster-id> | ||
pool: kubernetes | ||
csi.storage.k8s.io/provisioner-secret-name: csi-rbd-secret | ||
csi.storage.k8s.io/provisioner-secret-namespace: default | ||
csi.storage.k8s.io/node-stage-secret-name: csi-rbd-secret | ||
csi.storage.k8s.io/node-stage-secret-namespace: default | ||
reclaimPolicy: Delete | ||
#reclaimPolicy: Retain | ||
mountOptions: | ||
- discard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: db | ||
labels: | ||
app: db | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: db | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
labels: | ||
app: db | ||
spec: | ||
containers: | ||
- env: | ||
- name: POSTGRES_DB | ||
value: office | ||
- name: POSTGRES_PASSWORD | ||
value: offiA111333 | ||
- name: POSTGRES_USER | ||
value: officeAdemo | ||
image: postgres:9.6.1 | ||
name: db | ||
|
||
livenessProbe: | ||
tcpSocket: | ||
port: 5432 | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
|
||
ports: | ||
- containerPort: 5432 | ||
resources: {} | ||
volumeMounts: | ||
- mountPath: /var/lib/postgresql/data | ||
name: dbdata | ||
subPath: postgres | ||
restartPolicy: Always | ||
volumes: | ||
- name: dbdata | ||
persistentVolumeClaim: | ||
claimName: dbdata | ||
#readOnly: false | ||
|
||
|
||
# Service | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: db | ||
labels: | ||
app: db | ||
spec: | ||
ports: | ||
- name: tcp | ||
port: 5432 | ||
targetPort: 5432 | ||
selector: | ||
app: db | ||
|
||
|
||
# Storage | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: dbdata | ||
spec: | ||
accessModes: | ||
#- ReadWriteOnce | ||
- ReadWriteMany | ||
volumeMode: Filesystem | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
storageClassName: csi-rbd-sc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters