Skip to content

Commit

Permalink
Merge pull request #297 from Poorunga/helm-dev
Browse files Browse the repository at this point in the history
Add sedna installation helm charts
  • Loading branch information
kubeedge-bot authored Jun 2, 2022
2 parents c2cfc6f + 748d5b5 commit 0d2718b
Show file tree
Hide file tree
Showing 27 changed files with 45,436 additions and 0 deletions.
23 changes: 23 additions & 0 deletions build/helm/sedna/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
32 changes: 32 additions & 0 deletions build/helm/sedna/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: v2
name: sedna
description: A Helm chart for Sedna

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.4.3

dependencies:
- name: kb
version: 0.1.0
- name: gm
version: 0.1.0
- name: lc
version: 0.1.0
25 changes: 25 additions & 0 deletions build/helm/sedna/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Sedna Helm Charts

Visit https://github.com/kubeedge/sedna for more information.

## Install

```
$ git clone https://github.com/kubeedge/sedna.git
$ cd sedna
$ helm install sedna ./build/helm/sedna
```

## Uninstall

```
$ helm uninstall sedna
```

## Update CRDs

```
$ controller-gen crd:crdVersions=v1,allowDangerousTypes=true,maxDescLen=0 paths="./pkg/apis/sedna/v1alpha1" output:crd:artifacts:config=build/helm/sedna/crds
```

**NOTE: Set `maxDescLen=0` will generate crd yaml file without description field. Avoid too large data causing helm installation to fail. See [issue](https://github.com/helm/helm/issues/6711).**
24 changes: 24 additions & 0 deletions build/helm/sedna/charts/gm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: gm
description: A Helm chart for Sedna GM

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.4.3
17 changes: 17 additions & 0 deletions build/helm/sedna/charts/gm/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: gm-config
namespace: sedna
data:
gm.yaml: |
kubeConfig: {{ .Values.kubeConfig }}
master: {{ .Values.master }}
namespace: {{ .Values.namespace }}
websocket:
address: {{ .Values.websocket.address }}
port: {{ .Values.websocket.port }}
localController:
server: {{ .Values.localController.server }}
knowledgeBaseServer:
server: {{ .Values.knowledgeBaseServer.server }}
42 changes: 42 additions & 0 deletions build/helm/sedna/charts/gm/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gm
labels:
sedna: gm
namespace: sedna
spec:
replicas: 1
selector:
matchLabels:
sedna: gm
template:
metadata:
labels:
sedna: gm
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/edge
operator: DoesNotExist
serviceAccountName: sedna
containers:
- name: gm
image: {{ .Values.image }}
command: ["sedna-gm", "--config", "/config/gm.yaml", "-v2"]
volumeMounts:
- name: gm-config
mountPath: /config
resources:
requests:
memory: {{ .Values.resources.requests.memory }}
cpu: {{ .Values.resources.requests.cpu }}
limits:
memory: {{ .Values.resources.limits.memory }}
volumes:
- name: gm-config
configMap:
name: gm-config
14 changes: 14 additions & 0 deletions build/helm/sedna/charts/gm/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: gm
namespace: sedna
spec:
selector:
sedna: gm
type: ClusterIP
ports:
- protocol: TCP
port: 9000
targetPort: 9000
name: "tcp-0"
18 changes: 18 additions & 0 deletions build/helm/sedna/charts/gm/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
image: kubeedge/sedna-gm:v0.4.3
resources:
requests:
memory: 32Mi
cpu: 100m
limits:
memory: 256Mi
# gm-config
kubeConfig: ""
master: ""
namespace: ""
websocket:
address: 0.0.0.0
port: 9000
localController:
server: http://localhost:9100
knowledgeBaseServer:
server: http://kb.sedna:9020
23 changes: 23 additions & 0 deletions build/helm/sedna/charts/kb/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions build/helm/sedna/charts/kb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: kb
description: A Helm chart for Sedna KB

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.4.3
46 changes: 46 additions & 0 deletions build/helm/sedna/charts/kb/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: kb
labels:
sedna: kb
namespace: sedna
spec:
replicas: 1
selector:
matchLabels:
sedna: kb
template:
metadata:
labels:
sedna: kb
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: node-role.kubernetes.io/edge
operator: DoesNotExist
serviceAccountName: sedna
containers:
- name: kb
imagePullPolicy: IfNotPresent
image: {{ .Values.image }}
env:
- name: KB_URL
value: "sqlite:///db/kb.sqlite3"
volumeMounts:
- name: kb-url
mountPath: /db
resources:
requests:
memory: {{ .Values.resources.requests.memory }}
cpu: {{ .Values.resources.requests.cpu }}
limits:
memory: {{ .Values.resources.limits.memory }}
volumes:
- name: kb-url
hostPath:
path: /opt/kb-data
type: DirectoryOrCreate
14 changes: 14 additions & 0 deletions build/helm/sedna/charts/kb/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: kb
namespace: sedna
spec:
selector:
sedna: kb
type: ClusterIP
ports:
- protocol: TCP
port: 9020
targetPort: 9020
name: "tcp-0"
7 changes: 7 additions & 0 deletions build/helm/sedna/charts/kb/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
image: kubeedge/sedna-kb:v0.4.3
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
memory: 512Mi
24 changes: 24 additions & 0 deletions build/helm/sedna/charts/lc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: v2
name: lc
description: A Helm chart for Sedna LC

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: v0.4.3
46 changes: 46 additions & 0 deletions build/helm/sedna/charts/lc/templates/daemonset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
sedna: lc
name: lc
namespace: sedna
spec:
selector:
matchLabels:
sedna: lc
template:
metadata:
labels:
sedna: lc
spec:
containers:
- name: lc
image: kubeedge/sedna-lc:v0.4.3
env:
- name: GM_ADDRESS
value: gm.sedna:9000
- name: BIND_PORT
value: "9100"
- name: NODENAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
- name: ROOTFS_MOUNT_DIR
value: /rootfs
resources:
requests:
memory: {{ .Values.resources.requests.memory }}
cpu: {{ .Values.resources.requests.cpu }}
limits:
memory: {{ .Values.resources.limits.memory }}
volumeMounts:
- name: localcontroller
mountPath: /rootfs
volumes:
- name: localcontroller
hostPath:
path: /
restartPolicy: Always
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
Loading

0 comments on commit 0d2718b

Please sign in to comment.