-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from csatib02/feat/add-e2e-tests
feat(e2e): add e2e tests
- Loading branch information
Showing
23 changed files
with
531 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,12 +8,18 @@ on: | |
required: true | ||
default: false | ||
type: boolean | ||
|
||
outputs: | ||
container-image-tag: | ||
description: Container image tag | ||
value: ${{ jobs.container-image.outputs.tag }} | ||
jobs: | ||
container-image: | ||
name: Container-Image | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
tag: ${{ steps.meta.outputs.version }} | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
@@ -29,8 +35,7 @@ jobs: | |
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
flavor: | | ||
latest = false | ||
flavor: latest = false | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr,prefix=pr- | ||
|
@@ -50,30 +55,30 @@ jobs: | |
if: ${{ inputs.publish == false }} | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
outputs: type=oci,dest=image.tar | ||
outputs: type=docker,dest=image.tar | ||
|
||
- name: Build and push Docker image | ||
id: build | ||
uses: docker/build-push-action@v6 | ||
if: ${{ inputs.publish == true }} | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64, linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
outputs: type=image, push=true | ||
outputs: type=image,push=true | ||
|
||
- name: Upload image artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Kube-Pod-Autocomplete image | ||
name: Kube-Pod-Autocomplete Image | ||
path: image.tar | ||
|
||
binary: | ||
|
@@ -110,7 +115,7 @@ jobs: | |
- name: Upload binary artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Kube-Pod-Autocomplete-Binary | ||
name: Kube-Pod-Autocomplete Binary | ||
path: build/dist/* | ||
|
||
helm-chart: | ||
|
@@ -122,9 +127,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Set up Helm | ||
uses: azure/setup-helm@v1 | ||
with: | ||
version: v3.15.4 | ||
uses: azure/[email protected] | ||
|
||
- name: Helm lint | ||
run: make lint-helm | ||
|
@@ -136,5 +139,5 @@ jobs: | |
- name: Upload Helm chart artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Kube-Pod-Autocomplete-Helm-Chart | ||
name: Kube-Pod-Autocomplete Helm-Chart | ||
path: build/*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
deploy/charts/kube-pod-autocomplete/templates/kube-pod-autocomplete-ingress.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- if .Values.ingress.enabled }} | ||
--- | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Values.ingress.name }} | ||
namespace: {{ .Values.Namespace }} | ||
spec: | ||
rules: | ||
- host: {{ .Values.ingress.host }} | ||
http: | ||
paths: | ||
- path: / | ||
pathType: ImplementationSpecific | ||
backend: | ||
service: | ||
name: {{ .Values.service.name }} | ||
port: | ||
number: {{ .Values.service.externalPort }} | ||
{{- end }} |
5 changes: 3 additions & 2 deletions
5
deploy/charts/kube-pod-autocomplete/templates/kube-pod-autocomplete-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.name }} | ||
name: {{ .Values.service.name }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
selector: | ||
app.kubernetes.io/name: {{ .Values.name }} | ||
type: {{ .Values.service.type }} | ||
ports: | ||
- protocol: TCP | ||
port: {{ .Values.servicePort }} | ||
port: {{ .Values.service.servicePort }} | ||
targetPort: {{ .Values.containerPort }} | ||
externalPort: {{ .Values.service.externalPort }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace: kube-pod-autocomplete | ||
|
||
name: kube-pod-autocomplete | ||
replicas: 1 | ||
containerPort: 8080 | ||
|
||
service: | ||
name: kube-pod-autocomplete-service | ||
type: ClusterIP | ||
servicePort: 8080 | ||
externalPort: 8080 | ||
|
||
serviceAccount: | ||
name: kube-pod-autocomplete-sa | ||
|
||
ingress: | ||
enabled: false | ||
|
||
rbac: | ||
clusterRoleName: kube-pod-autocomplete-clusterrole | ||
resourceTypes: | ||
- "pods" | ||
clusterRoleBindingName: kube-pod-autocomplete-clusterrolebinding | ||
|
||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: "512Mi" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 |
Oops, something went wrong.