diff --git a/README.md b/README.md index caa0336..42a5d82 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,46 @@ -![CI](https://github.com/gitkent/helm-charts/actions/workflows/ci.yaml/badge.svg) +![CI](https://github.com/wiremock/helm-charts/actions/workflows/ci.yaml/badge.svg) -# helm-charts -Helm Chart for deployment to Kubernetes. +# WireMock Helm Charts + +Helm Chart for WireMock deployment to Kubernetes. +It allows deploying the official [WireMock Docker images](https://github.com/wiremock/wiremock-docker) +and also other charts that extend it, +in particular [holomekc/wiremock](https://github.com/holomekc/wiremock) with embedded UI. # Quick Start + ## Pre-requisites -1. [Install minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) -2. [Install helm](https://helm.sh/docs/intro/install/) -3. Deploy Wiremock - ```bash - helm upgrade --install ./chart/ - ``` \ No newline at end of file + +1. [Install Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) or use another Kubernetes cluster +2. [Install Helm](https://helm.sh/docs/intro/install/) + +## Install WireMock + +```bash +helm upgrade --install ./chart/ +``` + +Setup port forwarding + +```bash +$ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "wiremock.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + +$ kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort}} +``` + +## Verify Wiremock deployment + +To verify erifying a response using Wiremock, run + +```bash +$ curl -X POST http://127.0.0.1:8080/v1/hello +``` + +To check the web app when using `holomekc/wiremock`, visit http://127.0.0.1:8080/__admin/webapp on your browser. + +# References: + +- [WireMock Java Library](https://github.com/tomakehurst/wiremock) +- [Official WireMock Docker Image](https://github.com/wiremock/wiremock-docker) +- [WireMock extended with Web UI](https://github.com/holomekc/wiremock), a project by [(@holomekc]https://github.com/holomekc) + diff --git a/charts/wiremock/Chart.yaml b/charts/wiremock/Chart.yaml index 9e271f7..345ce52 100644 --- a/charts/wiremock/Chart.yaml +++ b/charts/wiremock/Chart.yaml @@ -1,5 +1,23 @@ apiVersion: v1 appVersion: "2.32.0.2" -description: A Helm chart for Wiremock deployment on Kubernetes +description: A Helm chart for WireMock deployment on Kubernetes name: wiremock -version: 0.1.3 +version: 0.1.4 +maintainers: + - name: "gitkent" + url: "https://github.com/gitkent" + - name: "oleg-nenashev" + url: "https://github.com/oleg-nenashev" +icon: "https://wiremock.org/images/logos/wiremock/logo_square.svg" +home: "https://wiremock.org" +sources: + - "https://github.com/wiremock/helm-charts" + - "https://github.com/wiremock/wiremock-docker" + - "https://github.com/wiremock/wiremock" +keywords: + - wiremock + - api + - openapi + - api-testing + - rest-api + - api-mocking diff --git a/charts/wiremock/README.md b/charts/wiremock/README.md index 4872c67..c2bd208 100644 --- a/charts/wiremock/README.md +++ b/charts/wiremock/README.md @@ -1,26 +1,45 @@ # wiremock-helm -Helm Chart for deployment Wiremock to Kubernetes + +Helm Chart for WireMock deployment to Kubernetes. +It allows deploying the official [WireMock Docker images](https://github.com/wiremock/wiremock-docker) +and also other charts that extend it, +in particular [holomekc/wiremock](https://github.com/holomekc/wiremock) with embedded UI. # Quick Start + ## Pre-requisites -1. [Install minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) + +1. [Install Minikube](https://kubernetes.io/docs/tasks/tools/install-minikube/) 2. [Install helm](https://helm.sh/docs/intro/install/) -3. Deploy Wiremock - ```bash - helm upgrade --install wiremock ./charts/wiremock - ``` -4. Verify Wiremock deployment - ```bash - $ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "wiremock.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - - $ kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort}} - ``` - Visit http://127.0.0.1:8080/__admin/webapp on your browser. -5. Verifying a response using Wiremock, run - ``` - $ curl -X POST http://127.0.0.1:8080/v1/hello - ``` +## Deploy WireMock + +Install WireMock using the Helm chart + +```bash +helm upgrade --install wiremock ./charts/wiremock +``` + +Setup port forwarding + +```bash +$ export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "wiremock.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + +$ kubectl port-forward $POD_NAME 8080:{{ .Values.service.internalPort}} +``` + +## Verify Wiremock deployment + +To verify erifying a response using Wiremock, run + +```bash +$ curl -X POST http://127.0.0.1:8080/v1/hello +``` + +To check the web app when using `holomekc/wiremock`, visit http://127.0.0.1:8080/__admin/webapp on your browser. + # References: -* https://github.com/holomekc/wiremock -* https://github.com/tomakehurst/wiremock \ No newline at end of file + +- [WireMock Java Library](https://github.com/tomakehurst/wiremock) +- [Official WireMock Docker Image](https://github.com/wiremock/wiremock-docker) +- [WireMock extended with Web UI](https://github.com/holomekc/wiremock), a project by [(@holomekc]https://github.com/holomekc)