forked from syndesisio/syndesis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add: build/deploy support based on kustomize & skaffold
- Loading branch information
David Arnold
committed
Aug 18, 2020
1 parent
6eb1d6d
commit 7f23272
Showing
9 changed files
with
270 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
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,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 |
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,6 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: syndesis | ||
|
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,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" |
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,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 |
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,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} |
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,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 | ||
|
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,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' | ||
|
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,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 | ||
|