Skip to content

Commit

Permalink
fix(helm): To fix un-expected {{end}} in helm template
Browse files Browse the repository at this point in the history
The block {{end}} at the end was not expected. This should be
removed. Moreover, I add basic helm lint and test to avoid
such kind of issue in future. This is running as non mandatory
step by github action

Closes #11398

Signed-off-by: Tam Mach <sayboras@yahoo.com>
  • Loading branch information
sayboras authored and tgraf committed May 11, 2020
1 parent fb5a886 commit 51934c8
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 28 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/helm-check.yaml
@@ -0,0 +1,43 @@
name: Helm Lint and Test Charts

on:
pull_request:
paths:
- 'install/kubernetes/**'

jobs:
quick-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check quick-install.yaml
run: |
cd install/kubernetes
make all
git diff --exit-code
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Run chart-testing (lint)
id: lint
uses: helm/chart-testing-action@v1.0.0-rc.2
with:
command: lint
config: install/kubernetes/chart-testing.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.0.0-rc.1
with:
install_local_path_provisioner: true
if: steps.lint.outputs.changed == 'true'

# This test is just to make sure the helm chart can be installed. It will not replace existing integration tests
- name: Run chart-testing (install)
uses: helm/chart-testing-action@v1.0.0-rc.2
with:
command: install
config: install/kubernetes/chart-testing.yaml
8 changes: 8 additions & 0 deletions install/kubernetes/chart-testing.yaml
@@ -0,0 +1,8 @@
# See https://github.com/helm/chart-testing#configuration
chart-dirs:
- install/kubernetes
all: true
debug: true
validate-maintainers: false
check-version-increment: false
helm-extra-args: --timeout 10m0s
2 changes: 1 addition & 1 deletion install/kubernetes/cilium/Chart.yaml
@@ -1,5 +1,6 @@
apiVersion: v1
name: cilium
home: https://cilium.io/
version: 1.7.90
appVersion: 1.7.90
tillerVersion: ">=2.7.2-0"
Expand All @@ -8,4 +9,3 @@ keywords:
sources:
- https://github.com/cilium/cilium
engine: gotpl

Expand Up @@ -7,4 +7,3 @@ metadata:
annotations:
{{ toYaml .Values.serviceAccount.annotations | indent 4 }}
{{- end }}
{{- end }}
24 changes: 12 additions & 12 deletions install/kubernetes/cilium/values.yaml
Expand Up @@ -91,8 +91,8 @@ global:
debug:
enabled: false

# verbose allows additional levels of debug/trace messaging
#verbose: flow
# verbose allows additional levels of debug/trace messaging
# verbose: flow

# prometheus enables
prometheus:
Expand Down Expand Up @@ -190,8 +190,8 @@ global:
# clustermesh
name: default

# id is a 8 bits unique cluster identifier when setting up clustermesh
#id: "1"
# id is a 8 bits unique cluster identifier when setting up clustermesh
# id: "1"

# tunnel is the encapsulation configuration for communication between nodes
# Possible values:
Expand All @@ -212,7 +212,7 @@ global:

# socketPath can be used to configure the path to the container runtime
# control socket, if it is on a non-standard path.
#socketPath:
# socketPath:

# bpf is the BPF datapath specific configuration
bpf:
Expand Down Expand Up @@ -378,11 +378,11 @@ global:

azure:
enabled: false
#resourceGroup: group1
#subscriptionID: 00000000-0000-0000-0000-000000000000
#tenantID: 00000000-0000-0000-0000-000000000000
#clientID: 00000000-0000-0000-0000-000000000000
#clientSecret: 00000000-0000-0000-0000-000000000000
# resourceGroup: group1
# subscriptionID: 00000000-0000-0000-0000-000000000000
# tenantID: 00000000-0000-0000-0000-000000000000
# clientID: 00000000-0000-0000-0000-000000000000
# clientSecret: 00000000-0000-0000-0000-000000000000

# cleanState instructs the cilium-agent DaemonSet to clean all state in the
# initContainer
Expand Down Expand Up @@ -432,7 +432,7 @@ global:
hubble:
enabled: false
ui:
enabled: false
enabled: false
# Default unix domain socket path to listen to when Hubble is enabled. Default to "/var/run/cilium/hubble.sock".
socketPath: /var/run/cilium/hubble.sock
# An additional address to listen to, for example:
Expand Down Expand Up @@ -469,7 +469,7 @@ global:
# documentation about Hubble's metric collection.
metrics:
enabled:
- drop
- drop
serviceMonitor:
enabled: false
# Configures the hubble-cli subchart
Expand Down
28 changes: 14 additions & 14 deletions install/kubernetes/quick-install.yaml
@@ -1,4 +1,18 @@
---
# Source: cilium/charts/agent/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cilium
namespace: kube-system
---
# Source: cilium/charts/operator/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cilium-operator
namespace: kube-system
---
# Source: cilium/charts/config/templates/configmap.yaml
apiVersion: v1
kind: ConfigMap
Expand Down Expand Up @@ -158,20 +172,6 @@ data:
# A space separated list of iptables chains to disable when installing feeder rules.
disable-iptables-feeder-rules: ""
---
# Source: cilium/charts/agent/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cilium
namespace: kube-system
---
# Source: cilium/charts/operator/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cilium-operator
namespace: kube-system
---
# Source: cilium/charts/agent/templates/clusterrole.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down

0 comments on commit 51934c8

Please sign in to comment.