Skip to content

Commit

Permalink
update helm chart
Browse files Browse the repository at this point in the history
**Phenomenon and reproduction steps**

update helm chart

**Root cause and solution**

**Impactions**

**Test method**

**Affected branch(es)**

* main

**Checklist**

- [ ] Dependencies update required
- [ ] Common bug (similar problem in other repo)
  • Loading branch information
宋 建昌 committed Aug 17, 2022
1 parent 240fd13 commit b523533
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 45 deletions.
66 changes: 30 additions & 36 deletions .github/workflows/release-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- main
# paths:
# - 'charts/**'
paths:
- 'charts/**'
workflow_dispatch:
inputs:
ref:
Expand Down Expand Up @@ -38,31 +38,10 @@ jobs:
with:
version: v3.8.1

# - name: Run chart-releaser
# uses: helm/[email protected]
# env:
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

# - name: Checkout
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: 'gh-pages'

# - name: run
# run: |
# gh repo clone deepflowys/deepflow
# cd deepflow/
# git checkout -b gh-pages origin/gh-pages
# cp -raf ../index.yaml ./index.yaml
# git config --global user.name "action"
# git config --global user.email "[email protected]"
# git remote set-url --push origin https://action:${{ secrets.PUSH_SECRET }}@github.com/deepflowys/deepflow
# git add index.yaml
# git commit -am "update charts"
# git push
# env:
# GH_TOKEN: ${{ secrets.PUSH_SECRET }}
- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Setup Minikube
uses: manusa/[email protected]
Expand Down Expand Up @@ -102,11 +81,9 @@ jobs:

- name: add deepflow helm repo
run: |
helm repo add deepflow https://deepflowys.github.io/deepflow
helm repo add deepflow https://deepflowys.github.io/deepflow-charts/
helm repo update deepflow
# helm pull deepflow/deepflow
# tar -zxvf deepflow-*.tgz
# helm show chart deepflow/charts/grafana |yq -e |jq -r .appVersion
- name: install deepflow
run: |
helm upgrade --install deepflow -n deepflow deepflow/deepflow --create-namespace \
Expand All @@ -122,8 +99,6 @@ jobs:
DEPENDSIMAGE=$(kubectl get pods -n deepflow -o jsonpath={.items[*].spec.containers[*].image}|awk -F" " '{for(i=1;i<=NF;i++) print $i}' |grep -v registry.cn-beijing.aliyuncs.com|sort -u)
for SYNCIMAGE in $DEPENDSIMAGE
do
#echo "FROM $SYNCIMAGE" > Dockerfile
#cat Dockerfile
SORTIMAGE=$(echo $SYNCIMAGE|awk -F/ '{print $NF}')
echo $SORTIMAGE
echo "skopeo copy -a docker://$SYNCIMAGE docker://deepflowce/$SORTIMAGE"
Expand All @@ -132,6 +107,25 @@ jobs:
skopeo copy -a docker://$SYNCIMAGE docker://deepflowce/$SORTIMAGE
skopeo copy -a docker://$SYNCIMAGE docker://registry.cn-beijing.aliyuncs.com/deepflow-ce/$SORTIMAGE
skopeo copy -a docker://$SYNCIMAGE docker://ghcr.io/deepflowys/deepflow-ce/$SORTIMAGE
# echo "docker buildx build --platform linux/amd64,linux/arm64 --push -t deepflowce/$SORTIMAGE -t registry.cn-beijing.aliyuncs.com/deepflow-ce/$SORTIMAGE -t ghcr.io/deepflowys/deepflow-ce/$SORTIMAGE -f Dockerfile ."
# docker buildx build --platform linux/amd64,linux/arm64 --push -t deepflowce/$SORTIMAGE -t registry.cn-beijing.aliyuncs.com/deepflow-ce/$SORTIMAGE -t ghcr.io/deepflowys/deepflow-ce/$SORTIMAGE -f Dockerfile .
done
done
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: 'gh-pages'

- name: run
run: |
gh repo clone deepflowys/deepflow
cd deepflow/
git checkout -b gh-pages origin/gh-pages
cp -raf ../index.yaml ./index.yaml
git config --global user.name "action"
git config --global user.email "[email protected]"
git remote set-url --push origin https://action:${{ secrets.PUSH_SECRET }}@github.com/deepflowys/deepflow
git add index.yaml
git commit -am "update charts"
git push
env:
GH_TOKEN: ${{ secrets.PUSH_SECRET }}
2 changes: 1 addition & 1 deletion charts/deepflow-agent/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: An automated observability platform for cloud-native developers.
name: deepflow-agent
engine: gotpl
type: application
version: 0.1.013
version: 0.1.014
appVersion: "6.1.1"
kubeVersion: ">=1.16.0-0"
sources:
Expand Down
2 changes: 1 addition & 1 deletion charts/deepflow-agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag .}}"
image: "{{ tpl .Values.image.repository . }}:{{ tpl (toString .Values.image.tag) . }}"
imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
ports:
- name: receive
Expand Down
2 changes: 1 addition & 1 deletion charts/deepflow/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: An automated observability platform for cloud-native developers.
name: deepflow
engine: gotpl
type: application
version: 0.1.013
version: 0.1.014
appVersion: "6.1.1"
kubeVersion: ">=1.16.0-0"
sources:
Expand Down
4 changes: 2 additions & 2 deletions charts/deepflow/charts/clickhouse/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers:
- name: clickhouse-init
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }}"
image: "{{ tpl .Values.image.repository . }}:{{ tpl (toString .Values.image.tag) . }}"
volumeMounts:
- name: clickhouse-path
mountPath: /var/lib/clickhouse/
Expand All @@ -44,7 +44,7 @@ spec:
- name: clickhouse
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }}"
image: "{{ tpl .Values.image.repository . }}:{{ tpl (toString .Values.image.tag) . }}"
imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
env:
- name: TZ
Expand Down
4 changes: 2 additions & 2 deletions charts/deepflow/charts/mysql/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
{{- if and (eq ( tpl $.Values.storageConfig.generateType . ) "hostPath") ($.Values.storageConfig.hostPathChownContainerEnabled) }}
initContainers:
- name: hostpath-chown
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }}"
image: "{{ tpl .Values.image.repository . }}:{{ tpl (toString .Values.image.tag) . }}"
securityContext:
runAsNonRoot: false
runAsUser: 0
Expand All @@ -51,7 +51,7 @@ spec:
- name: mysql
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ tpl .Values.image.repository . }}:{{ tpl .Values.image.tag . }}"
image: "{{ tpl .Values.image.repository . }}:{{ tpl (toString .Values.image.tag) . }}"
imagePullPolicy: {{ tpl .Values.image.pullPolicy . }}
ports:
- name: tcp
Expand Down
20 changes: 18 additions & 2 deletions charts/deepflow/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -403,10 +403,11 @@ clickhouse:
dnsPolicy: "{{ .Values.global.dnsPolicy }}"
podManagementPolicy: "{{ .Values.global.podManagementPolicy }}"
image:
repository: clickhouse/clickhouse-server
## Clickhouse Dockerhub Image repository: clickhouse/clickhouse-server
repository: "{{ .Values.global.image.repository }}/clickhouse-server"
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "21.8.15.7"
tag: 21.8.15.7

timezone: "{{ .Values.global.timezone }}"
imagePullSecrets: []
Expand Down Expand Up @@ -553,6 +554,13 @@ mysql:
timezone: "{{ .Values.global.timezone }}"
podAnnotations: {}

image:
## MySQL Dockerhub Image repository: mysql
repository: "{{ .Values.global.image.repository }}/mysql"
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: 8.0.26

podSecurityContext: {}
# fsGroup: 2000

Expand Down Expand Up @@ -763,6 +771,14 @@ grafana:
defaultDashboardsTimezone: utc
adminPassword: deepflow

image:
## Grafana aliyun Image repository: registry.cn-beijing.aliyuncs.com/deepflow-ce/grafana
repository: grafana/grafana
# Overrides the Grafana image tag whose default is the chart appVersion
tag: ""
sha: ""
pullPolicy: IfNotPresent

service:
enabled: true
type: NodePort
Expand Down

0 comments on commit b523533

Please sign in to comment.