#67 revert #64

Merged
yangxzh1 merged 2 commits from openioctopus/octopus:master into master 2 years ago
  1. +0
    -3
      deploy/charts/octopus/Chart.yaml
  2. +0
    -3
      deploy/charts/octopus/requirements.yaml
  3. +0
    -46
      deploy/charts/octopus/templates/_helpers.tpl
  4. +0
    -71
      deploy/charts/octopus/templates/eventrouter.yaml
  5. +1
    -10
      deploy/charts/octopus/templates/storage/initdb.yaml
  6. +1
    -16
      deploy/charts/octopus/templates/storage/pv.yaml
  7. +0
    -15
      deploy/charts/octopus/templates/storage/pvc.yaml
  8. +0
    -36
      deploy/charts/octopus/values.yaml

+ 0
- 3
deploy/charts/octopus/Chart.yaml View File

@@ -35,9 +35,6 @@ dependencies:
- name: nginx-ingress-controller
version: 7.6.9
repository: https://charts.bitnami.com/bitnami
- name: influxdb
version: 2.3.9
repository: https://charts.bitnami.com/bitnami

home: https://octopus.openi.org.cn/
icon: https://git.openi.org.cn/OpenI/octopus/media/branch/master/logo.png


+ 0
- 3
deploy/charts/octopus/requirements.yaml View File

@@ -10,7 +10,4 @@ dependencies:
repository: https://charts.bitnami.com/bitnami
- name: nginx-ingress-controller
version: 7.6.9
repository: https://charts.bitnami.com/bitnami
- name: influxdb
version: 2.3.9
repository: https://charts.bitnami.com/bitnami

+ 0
- 46
deploy/charts/octopus/templates/_helpers.tpl View File

@@ -695,52 +695,6 @@ octopus.pcl.ac.cn/resource: {{ .Values.common.resourceTagValuePrefix }}_{{ inclu
{{- printf "%s:%s" (include "redis.serviceName" .) .Values.redis.master.service.port -}}
{{- end -}}

{{/******************influxdb******************/}}

{{- define "influxdb.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "influxdb.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- printf "%s-influxdb" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{- define "influxdb.serviceName" -}}
{{- printf "%s" (include "influxdb.fullname" .) -}}
{{- end -}}

{{- define "influxdb.serviceAddr" -}}
{{- printf "%s:%s" (include "influxdb.serviceName" .) .Values.influxdb.service.port -}}
{{- end -}}

{{/******************eventrouter******************/}}

{{- define "eventrouter.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{- define "eventrouter.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- printf "%s-eventrouter" .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/****************** Prometheus ******************/}}

{{- define "prometheus.name" -}}


+ 0
- 71
deploy/charts/octopus/templates/eventrouter.yaml View File

@@ -1,71 +0,0 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: eventrouter
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: eventrouter
rules:
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "watch", "list"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: eventrouter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: eventrouter
subjects:
- kind: ServiceAccount
name: eventrouter
namespace: {{ .Release.Namespace }}
---
apiVersion: v1
data:
config.json: |-
{
"sink": "influxdb",
"influxdbHost": {{ include "influxdb.serviceAddr" . }},
"influxdbUsername": {{ .Values.influxdb.auth.user.username }},
"influxdbPassword":{{ .Values.influxdb.auth.user.password }},
"influxdbName": "octopus",
"influxdbWithFields": true
}
kind: ConfigMap
metadata:
name: eventrouter-cm
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "eventrouter.fullname" . }}
labels:
app: eventrouter
spec:
replicas: 1
selector:
matchLabels:
app: eventrouter
template:
metadata:
labels:
app: eventrouter
tier: control-plane-addons
spec:
containers:
- name: kube-eventrouter
image: swr.cn-south-1.myhuaweicloud.com/openioctopus/heptio-images/eventrouter:v0.3
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config-volume
mountPath: /etc/eventrouter
serviceAccount: eventrouter
volumes:
- name: config-volume
configMap:
name: eventrouter-cm

+ 1
- 10
deploy/charts/octopus/templates/storage/initdb.yaml View File

@@ -5,13 +5,4 @@ metadata:
data:
initdb.sql: |
CREATE DATABASE IF NOT EXISTS octopus DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS core DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
---
apiVersion: v1
kind: ConfigMap
metadata:
name: influxdb-initdb-config
data:
custom-init-scripts.sh: |
influx -execute "CREATE DATABASE octopus" -username octopus -password octopus
influx -execute "CREATE RETENTION POLICY \"default\" ON octopus DURATION 0s REPLICATION 1 DEFAULT" -username {{ .Values.influxdb.auth.user.username }} -password {{ .Values.influxdb.auth.user.password }}
CREATE DATABASE IF NOT EXISTS core DEFAULT CHARSET utf8 COLLATE utf8_general_ci;

+ 1
- 16
deploy/charts/octopus/templates/storage/pv.yaml View File

@@ -54,19 +54,4 @@ spec:
storage: {{ .Values.pv.logger.requests }}
accessModes:
- ReadWriteMany
{{ toYaml .Values.pv.logger.storageType | indent 2 }}

---

apiVersion: v1
kind: PersistentVolume
metadata:
name: octopus-influxdb-pv
labels:
pv: influxdb-pv
spec:
capacity:
storage: {{ .Values.pv.influxdb.requests }}
accessModes:
- ReadWriteMany
{{ toYaml .Values.pv.influxdb.storageType | indent 2 }}
{{ toYaml .Values.pv.logger.storageType | indent 2 }}

+ 0
- 15
deploy/charts/octopus/templates/storage/pvc.yaml View File

@@ -56,21 +56,6 @@ spec:

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: octopus-influxdb-pvc
spec:
accessModes: ["ReadWriteMany"]
resources:
requests:
storage: {{ .Values.pvc.influxdb.requests }}
selector:
matchLabels:
pv: influxdb-pv

---

apiVersion: v1
kind: PersistentVolumeClaim
metadata:


+ 0
- 36
deploy/charts/octopus/values.yaml View File

@@ -38,8 +38,6 @@ pvc:
requests: 100Gi
redis:
requests: 100Gi
influxdb:
requests: 100Gi
logger:
requests: 100Gi

@@ -62,12 +60,6 @@ pv:
nfs:
server: 192.168.203.72
path: /data/datasets/data/redis
influxdb:
requests: 100Gi
storageType:
nfs:
server: 192.168.203.72
path: /data/datasets/data/influxdb
logger:
requests: 100Gi
storageType:
@@ -312,34 +304,6 @@ nginx-ingress-controller:
- x86-64
- x86_64

# influxdb
influxdb:
replicaCount: 1
service:
type: NodePort
port: "8086"
auth:
user:
username: "octopus"
password: "octopus"
persistence:
enabled: true
size: "100Gi"
existingClaim: "octopus-influxdb-pvc"
initdbScriptsCM: "influxdb-initdb-config"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- x64
- x86-64
- x86_64

# grafana
grafana:
nameOverride: "grafana"


Loading…
Cancel
Save