mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
add helm chart
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{{- if .Values.apiserver.enabled -}}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ template "kubevela.name" . }}-api
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "kubevela.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.apiserver.port }}
|
||||
targetPort: {{ .Values.apiserver.port }}
|
||||
protocol: TCP
|
||||
name: api
|
||||
selector:
|
||||
{{- include "kubevela.selectorLabels" . | nindent 6 }}
|
||||
|
||||
{{- end }}
|
||||
@@ -158,6 +158,24 @@ spec:
|
||||
name: tls-cert-vol
|
||||
readOnly: true
|
||||
{{ end }}
|
||||
{{- if .Values.apiserver.enabled -}}
|
||||
- name: {{ .Release.Name }}-api
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
command:
|
||||
- "apiserver"
|
||||
args:
|
||||
- "start"
|
||||
- "--port={{ .Values.apiserver.port }}"
|
||||
ports:
|
||||
- containerPort: {{ .Values.apiserver.port }}
|
||||
name: api
|
||||
protocol: TCP
|
||||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }}
|
||||
imagePullPolicy: {{ quote .Values.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
||||
{{ end }}
|
||||
{{ if .Values.admissionWebhooks.enabled }}
|
||||
volumes:
|
||||
- name: tls-cert-vol
|
||||
|
||||
@@ -78,6 +78,18 @@ admissionWebhooks:
|
||||
# If autoGenWorkloadDefinition is true, webhook will auto generated workloadDefinition which componentDefinition refers to
|
||||
autoGenWorkloadDefinition: true
|
||||
|
||||
apiserver:
|
||||
enabled: true
|
||||
port: 8000
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 1Gi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 20Mi
|
||||
|
||||
|
||||
#Enable debug logs for development purpose
|
||||
logDebug: false
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import (
|
||||
|
||||
func main() {
|
||||
app := commands.NewCLI(
|
||||
"velacp",
|
||||
"KubeVela control plane",
|
||||
"apiserver",
|
||||
"KubeVela API Server",
|
||||
)
|
||||
app.AddCommands(
|
||||
server.NewServerCommand(),
|
||||
|
||||
@@ -34,14 +34,13 @@ func NewServerCommand() *cobra.Command {
|
||||
s := &server{}
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "apiserver",
|
||||
Use: "start",
|
||||
Short: "Start running apiserver.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return s.run()
|
||||
},
|
||||
}
|
||||
|
||||
// rest
|
||||
cmd.Flags().IntVar(&s.restCfg.Port, "port", 8000, "The port number used to serve the http APIs.")
|
||||
|
||||
return cmd
|
||||
|
||||
Reference in New Issue
Block a user