diff --git a/deploy/bases/Kustomization.yaml b/deploy/bases/Kustomization.yaml new file mode 100644 index 00000000000..789de6c1d0e --- /dev/null +++ b/deploy/bases/Kustomization.yaml @@ -0,0 +1,20 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +commonLabels: + app: syndesis + syndesis.io/app: syndesis + syndesis.io/type: infrastructure + app.kubernetes.io/name: syndesis + app.kubernetes.io/part-of: syndesis + app.kubernetes.io/version: 1.11.0-20200813 + +resources: + - ../../install/operator/deploy + - ./namespace.yaml + - ./pvc.yaml + - ./rbac.yaml + - ./secrets.yaml + - ./cr.yaml + diff --git a/deploy/bases/cr.yaml b/deploy/bases/cr.yaml new file mode 100644 index 00000000000..2409256b6d1 --- /dev/null +++ b/deploy/bases/cr.yaml @@ -0,0 +1,17 @@ +--- +apiVersion: syndesis.io/v1beta1 +kind: Syndesis +metadata: + name: app +spec: + # + # Route hostname is required for the accessing ingress + # + routeHostname: ${external_host} + components: + oauth: + # + # Secrets are required for oauth authorisation and authentication + # + credentialsSecret: syndesis-oauth-credentials + cryptoCommsSecret: syndesis-oauth-comms diff --git a/deploy/bases/namespace.yaml b/deploy/bases/namespace.yaml new file mode 100644 index 00000000000..5aacb7c8b27 --- /dev/null +++ b/deploy/bases/namespace.yaml @@ -0,0 +1,6 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: syndesis + diff --git a/deploy/bases/pvc.yaml b/deploy/bases/pvc.yaml new file mode 100644 index 00000000000..469ea5188f9 --- /dev/null +++ b/deploy/bases/pvc.yaml @@ -0,0 +1,144 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0001 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0001" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0002 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0002" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0003 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0003" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0004 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0004" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0005 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0005" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0006 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0006" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0007 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0007" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0008 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0008" +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: syndesis-pv0009 + labels: + type: local +spec: + storageClassName: standard + persistentVolumeReclaimPolicy: Recycle + capacity: + storage: 1Gi + accessModes: + - ReadWriteOnce + hostPath: + path: "/data/pv0009" diff --git a/deploy/bases/rbac.yaml b/deploy/bases/rbac.yaml new file mode 100644 index 00000000000..3e030037c44 --- /dev/null +++ b/deploy/bases/rbac.yaml @@ -0,0 +1,14 @@ +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +metadata: + name: syndesis-admin + namespace: syndesis +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: admin +subjects: +- apiGroup: rbac.authorization.k8s.io + kind: User + name: developer diff --git a/deploy/bases/secrets.yaml b/deploy/bases/secrets.yaml new file mode 100644 index 00000000000..aca7c05984e --- /dev/null +++ b/deploy/bases/secrets.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: syndesis-oauth-credentials +stringData: + OAUTH2_PROXY_PROVIDER: "${provider}" + OAUTH2_PROXY_CLIENT_ID: "${client_id}" + OAUTH2_PROXY_CLIENT_SECRET: "${client_secret}" +--- +apiVersion: v1 +kind: Secret +metadata: + name: syndesis-oauth-comms +type: kubernetes.io/tls +data: + tls.key: ${oauth_key} + tls.crt: ${oauth_cert} diff --git a/install/operator/deploy/Kustomization.yaml b/install/operator/deploy/Kustomization.yaml new file mode 100644 index 00000000000..f2637db4a8e --- /dev/null +++ b/install/operator/deploy/Kustomization.yaml @@ -0,0 +1,13 @@ +--- +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +resources: + - ./crds/syndesis.io_syndeses_crd.yaml + - ./cluster_role.yaml + - ./cluster_role_binding.yaml + - ./role.yaml + - ./role_binding.yaml + - ./service_account.yaml + - ./operator.yaml + diff --git a/justfile b/justfile new file mode 100644 index 00000000000..e912dd7a9e6 --- /dev/null +++ b/justfile @@ -0,0 +1,18 @@ + +# explore k8s api +k8sapi: + kubectl proxy --port=8080 & + xdg-open http://localhost:8080 + +# (re)create dev cluster +k3drecreate: + #!/bin/bash + k3d cluster delete || true + mkdir -p /tmp/k3d/kubelet/pods + # Note: we expose a volume mount of `shared` type to enable the + # Container Storage Interface related functionlity which depends on mount type shared volumes + # So we can do `kubectl alpha debug` and span ephemeral containers for debugging + k3d cluster create --api-port 6550 -p 8081:80@loadbalancer --agents 2 \ + -v /tmp/k3d/kubelet/pods:/var/lib/kubelet/pods:shared \ + --k3s-server-arg '--kube-apiserver-arg=feature-gates=EphemeralContainers=true' + diff --git a/skaffold.yaml b/skaffold.yaml new file mode 100644 index 00000000000..758ccdfe429 --- /dev/null +++ b/skaffold.yaml @@ -0,0 +1,20 @@ +apiVersion: skaffold/v2beta6 +kind: Config +metadata: + name: syndesis +build: + artifacts: + - image: syndesis/syndesis-operator + context: install/operator/build + - image: syndesis/syndesis-meta + context: install/operator/build + - image: syndesis/syndesis-server + context: install/operator/build + - image: syndesis/syndesis-ui + context: install/operator/build +deploy: + kustomize: + paths: + - deploy/bases + kubeContext: k3d-k3s-default +