Skip to content

Commit

Permalink
feat: add manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
panshuai111 committed Dec 22, 2023
1 parent 228d155 commit 3210d72
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 0 deletions.
25 changes: 25 additions & 0 deletions manifests/configmap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
apiVersion: v1
data:
config: |-
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://karbour-server.karbour.svc:7443
name: karbour
contexts:
- context:
cluster: karbour
user: karbour
name: karbour
current-context: karbour
kind: Config
users:
- name: karbour
user:
username: u1
password: p1
kind: ConfigMap
metadata:
name: karbour-kubeconfig
namespace: karbour
65 changes: 65 additions & 0 deletions manifests/elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: v1
kind: Service
metadata:
name: elasticsearch
namespace: karbour
spec:
ports:
- port: 9200
selector:
app: elasticsearch
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: elasticsearch
name: elasticsearch
namespace: karbour
spec:
replicas: 1
selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- env:
- name: discovery.type
value: single-node
- name: xpack.security.enabled
value: "false"
- name: xpack.security.http.ssl.enabled
value: "false"
- name: xpack.security.transport.ssl.enabled
value: "false"
- name: KIBANA_PASSWORD
value: dangerous0
- name: ELASTIC_PASSWORD
value: elastic
- name: ES_JAVA_OPTS
value: -Xms1g -Xmx1g
image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2
imagePullPolicy: IfNotPresent
name: elasticsearch
ports:
- containerPort: 9200
protocol: TCP
resources:
limits:
cpu: "2"
memory: 4Gi
ephemeral-storage: 10Gi
requests:
cpu: "2"
memory: 4Gi
ephemeral-storage: 10Gi
volumeMounts:
- mountPath: /usr/share/elasticsearch/data
name: data
volumes:
- emptyDir: { }
name: data
48 changes: 48 additions & 0 deletions manifests/etcd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
apiVersion: v1
kind: Service
metadata:
name: etcd
namespace: karbour
spec:
ports:
- port: 2379
selector:
app: etcd
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: etcd
namespace: karbour
spec:
serviceName: etcd
replicas: 1
selector:
matchLabels:
app: etcd
template:
metadata:
labels:
app: etcd
spec:
containers:
- name: etcd
image: quay.io/coreos/etcd:v3.5.11
command:
- "/usr/local/bin/etcd"
env:
- name: ETCD_DATA_DIR
value: /etcd-data/default.etcd
ports:
- containerPort: 2379
volumeMounts:
- name: data
mountPath: /etcd-data
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 10Gi
43 changes: 43 additions & 0 deletions manifests/karbour-server.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apiVersion: v1
kind: Service
metadata:
name: karbour-server
namespace: karbour
spec:
ports:
- port: 7443
selector:
app: karbour-server
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: karbour-server
name: karbour-server
namespace: karbour
spec:
replicas: 1
selector:
matchLabels:
app: karbour-server
template:
metadata:
labels:
app: karbour-server
spec:
containers:
- args:
- --feature-gates=APIPriorityAndFairness=false
- --disable-admission-plugins=MutatingAdmissionWebhook,NamespaceLifecycle,ValidatingAdmissionWebhook,ValidatingAdmissionPolicy
- --cors-allowed-origins=.*
- --search-storage-type=elasticsearch
- --elastic-search-addresses=http://elasticsearch.karbour.svc:9200
- --etcd-servers=http://etcd.karbour.svc:2379
- --secure-port=7443
command:
- /karbour
image: kusionstack/karbour:latest
name: karbour-server
ports:
- containerPort: 7443
37 changes: 37 additions & 0 deletions manifests/karbour-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: karbour-syncer
name: karbour-syncer
namespace: karbour
spec:
replicas: 1
selector:
matchLabels:
app: karbour-syncer
template:
metadata:
labels:
app: karbour-syncer
spec:
containers:
- command:
- /karbour
- syncer
args:
- --es-address=http://elasticsearch.karbour.svc:9200
env:
- name: KUBECONFIG
value: /etc/karbour/config
image: kusionstack/karbour:latest
name: karbour-server
ports:
- containerPort: 7443
volumeMounts:
- mountPath: /etc/karbour/
name: karbour-kubeconfig
volumes:
- name: karbour-kubeconfig
configMap:
name: karbour-kubeconfig
4 changes: 4 additions & 0 deletions manifests/namespace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: karbour

0 comments on commit 3210d72

Please sign in to comment.