diff --git a/.github/workflows/basic_test.yml b/.github/workflows/basic_test.yml new file mode 100644 index 0000000..e5b3146 --- /dev/null +++ b/.github/workflows/basic_test.yml @@ -0,0 +1,39 @@ +name: Test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + example: + name: Minikube installation - Basic test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Minikube + uses: manusa/actions-setup-minikube@v2.7.2 + with: + minikube version: 'v1.28.0' + kubernetes version: 'v1.25.4' + github token: ${{ secrets.GITHUB_TOKEN }} + #- run: minikube addons list + #- name: Interact with the cluster + # run: kubectl get nodes + - name: Checkout code + uses: actions/checkout@v3 + - name: Install Swagger-ui + run: helm install swagger-ui . + - name: Check deployment status + run: | + kubectl rollout status --watch deployment/swagger-ui-swaggerui --timeout=5m + + # this test would be nice but it does not work in its current state + #- name: Check web application responds + # run: | + # curl -sk http://$(kubectl get nodes --namespace default -o jsonpath="{.items[0].status.addresses[0].address}"):$(kubectl get --namespace default -o jsonpath="{.spec.ports[0].nodePort}" services swagger-ui-swaggerui) | \ + # grep 'Swagger UI' diff --git a/Chart.yaml b/Chart.yaml index ad8bd40..4ceb659 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v2 name: swaggerui -version: 0.3.5 +version: 0.3.6 appVersion: 3.24.3 description: Swagger is an open-source software framework backed by a large ecosystem of tools that helps developers design, build, document, and consume RESTful Web services. keywords: diff --git a/README.md b/README.md index 1e916e1..c2c2619 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Helm Chart for swagger-ui [![CircleCI](https://circleci.com/gh/cetic/helm-swagger-ui.svg?style=svg)](https://circleci.com/gh/cetic/helm-swagger-ui/tree/master) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![version](https://img.shields.io/github/tag/cetic/helm-swagger-ui.svg?label=release) +![test](https://github.com/cetic/helm-swagger-ui/actions/workflows/basic_test.yml/badge.svg) ## Introduction @@ -37,7 +38,7 @@ The following items can be set via `--set` flag during installation or configure Install the swagger-ui helm chart with a release name `my-release`: ```bash -helm install --name my-release cetic/swaggerui +helm install my-release cetic/swaggerui ``` ## Uninstallation @@ -45,7 +46,7 @@ helm install --name my-release cetic/swaggerui To uninstall/delete the `my-release` deployment: ```bash -helm delete --purge my-release +helm delete my-release ``` ## Configuration @@ -101,4 +102,4 @@ Please read the official [Contribution Guide](https://github.com/helm/charts/blo ## License -[Apache License 2.0](/LICENSE.md) \ No newline at end of file +[Apache License 2.0](/LICENSE.md) diff --git a/templates/hpa.yaml b/templates/hpa.yaml index 6c8f5af..3ea8256 100644 --- a/templates/hpa.yaml +++ b/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2beta2 kind: HorizontalPodAutoscaler metadata: name: {{ include "swagger-ui.fullname" . }} @@ -20,12 +20,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}