Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into kube-linter
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo committed Feb 16, 2023
2 parents b5fd365 + 5bbe4fc commit e6a5b45
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 17 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/main-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
with:
fetch-depth: 0

- name: setup golang
uses: actions/setup-go@v3
with:
go-version: '^1.20'

- name: Set up Helm
uses: azure/setup-helm@v3
with:
Expand All @@ -32,10 +37,8 @@ jobs:
with:
python-version: "3.11"

- name: Run kube-linter
uses: stackrox/kube-linter-action@v1
with:
directory: charts/kong
- name: Run linters
run: make lint

- name: Set up chart-testing
uses: helm/[email protected]
Expand Down
16 changes: 7 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq (,$(shell go env GOBIN))
GOBIN=$(shell go env GOPATH)/bin
else
GOBIN=$(shell go env GOBIN)
endif

PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

.PHONY: _download_tool
Expand All @@ -21,8 +14,13 @@ kube-linter:
@$(MAKE) _download_tool TOOL=kube-linter

.PHONY: lint
lint: ./scripts/*
lint: tools lint.charts.kong lint.shellcheck

.PHONY: lint.charts.kong
lint.charts.kong:
$(KUBE_LINTER) lint charts/kong

lint.shellcheck: ./scripts/*
@for script in $^ ; do \
shellcheck $${script} ; \
done
$(KUBE_LINTER) lint charts/kong
10 changes: 10 additions & 0 deletions charts/kong/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

## Unreleased

### Under the hood

* Add kube-linter to the CI pipeline to ensure produced manifests comply
with community best practices.
[#751](https://github.com/Kong/charts/pull/751)

## 2.16.5

* Fix autoscaling version detection.
[#744](https://github.com/Kong/charts/pull/744)
* Don't include a clear-stale-pid initContainer when kong gateway is not
enabled in the deployment.
[#744](https://github.com/Kong/charts/pull/744)
Expand Down
2 changes: 1 addition & 1 deletion charts/kong/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ maintainers:
name: kong
sources:
- https://github.com/Kong/charts/tree/main/charts/kong
version: 2.16.4
version: 2.16.5
appVersion: "3.1"
dependencies:
- name: postgresql
Expand Down
6 changes: 3 additions & 3 deletions charts/kong/templates/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ spec:
behavior:
{{- toYaml .Values.autoscaling.behavior | nindent 4 }}
{{- end }}
{{- if not (.Capabilities.APIVersions.Has "autoscaling/v2beta2") }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage | default 80 }}
{{- else }}
{{- if contains "autoscaling/v2" (include "kong.autoscalingVersion" . ) }}
metrics:
{{- toYaml .Values.autoscaling.metrics | nindent 4 }}
{{- else }}
targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage | default 80 }}
{{- end }}
{{- end }}

0 comments on commit e6a5b45

Please sign in to comment.