Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricve committed Nov 27, 2024
1 parent 99b6f71 commit 9b8050a
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/kind-cloud.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy on Kind

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
deploy-kind:
runs-on: ubuntu-latest
strategy:
matrix:
kind: [v0.21.0, v0.22.0, v0.23.0, v0.24.0]
steps:
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1
with:
version: ${{ matrix.kind }}
- name: Print Kubernetes Version
run: |
kubectl version
- name: Test Kubernetes Cluster
run: |
kubectl get no
kubectl get pods -A -o wide
kubectl get sc
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Kerberos Hub helm chart
id: install-kerberos-hub
run: |
kubectl create namespace kerberos-hub
helm install hub ./ --values kerberos-hub-values.yaml -n kerberos-hub --create-namespace
echo "Sleeping for 300 seconds, give time for the helm chart to create the pods" && sleep 300
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep hub-frontend | awk '{print $3}' | grep -q '1/1' && echo "hub-frontend pod is running with status 1/1" || (echo "kerberos-hub pod is not running with status 1/1" && exit 1)
36 changes: 36 additions & 0 deletions .github/workflows/microk8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy on Microk8s

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
deploy-microk8s:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
name: MicroK8s
steps:
- uses: balchua/microk8s-actions@v0.4.3
with:
channel: "1.30/stable"
addons: '["dns", "dashboard", "hostpath-storage", "nvidia"]'
- name: Set permissions
run: |
sudo chown -f -R $USER $HOME/.kube $HOME/.config
- name: Test MicroK8s
id: list-pods
run: |
kubectl get no
kubectl get pods -A -o wide
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Kerberos Hub helm chart
id: install-kerberos-hub
run: |
kubectl create namespace kerberos-hub
helm install hub ./ --values kerberos-hub-values.yaml -n kerberos-hub --create-namespace
echo "Sleeping for 300 seconds, give time for the helm chart to create the pods" && sleep 300
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep hub-frontend | awk '{print $3}' | grep -q '1/1' && echo "hub-frontend pod is running with status 1/1" || (echo "kerberos-hub pod is not running with status 1/1" && exit 1)
2 changes: 1 addition & 1 deletion charts/hub/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.73.0
version: 0.74.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 2 additions & 0 deletions charts/hub/templates/kerberos-hub/hub-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ spec:
protocol: TCP
selector:
app: hub-api
{{ if ne .Values.ingress "" }}
---
{{ if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
Expand Down Expand Up @@ -92,6 +93,7 @@ spec:
servicePort: 8081
{{- end }}
{{ end }}
{{- end }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down
2 changes: 2 additions & 0 deletions charts/hub/templates/kerberos-hub/hub-frontend-demo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
name: http
selector:
app: hub-frontend-demo
{{ if ne .Values.ingress "" }}
---
{{ if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
Expand Down Expand Up @@ -55,6 +56,7 @@ spec:
serviceName: hub-frontend-demo-svc
servicePort: 80
{{ end }}
{{ end }}
---
apiVersion: apps/v1
kind: Deployment
Expand Down
2 changes: 2 additions & 0 deletions charts/hub/templates/kerberos-hub/hub-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spec:
name: http
selector:
app: hub-frontend
{{ if ne .Values.ingress "" }}
---
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
apiVersion: networking.k8s.io/v1
Expand Down Expand Up @@ -103,6 +104,7 @@ spec:
servicePort: 80
{{- end }}
{{- end }}
{{- end }}
{{- if eq .Values.kerberoshub.oauth2Proxy.enabled true }}
---
apiVersion: networking.k8s.io/v1
Expand Down

0 comments on commit 9b8050a

Please sign in to comment.