-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c45b37c
commit d8b441e
Showing
4 changed files
with
77 additions
and
148 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: "CI" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
default: | ||
runs-on: ubuntu-latest | ||
env: | ||
AUTH_KEY: ${{ secrets.HEADSCALE_PREAUTH_KEY }} | ||
HEADSCALE_API_URL: "https://dsilva-headscale-vpn.fly.dev" | ||
TAILSCALE_UPGRADE: "1" | ||
steps: | ||
# Connect to private network with tailscale | ||
- name: Install tailscale | ||
run: curl -fsSL https://tailscale.com/install.sh | sh | ||
|
||
- name: Start Tailscale | ||
run: sudo tailscale up --auth-key $AUTH_KEY --login-server $HEADSCALE_API_URL --accept-routes | ||
|
||
- name: Tailscale status | ||
run: tailscale status | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- uses: azure/setup-kubectl@v4 | ||
id: kubectl-install | ||
with: | ||
version: 'v1.30.1' | ||
|
||
- name: Setup kubeconfig | ||
run: | | ||
mkdir -p ~/.kube | ||
echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config | ||
- name: Setup ArgoCD OIDC and RBAC | ||
run: | | ||
echo "Setting up ArgoCD OIDC and RBAC" | ||
kubectl -n argocd patch secret argocd-secret -p '{ | ||
"stringData": { | ||
"oidc.keycloak.clientSecret": "'$ARGOCD_OIDC_CLIENT_SECRET'" | ||
} | ||
}' | ||
kubectl -n argocd patch cm argocd-cm --type merge --patch "$(cat ./ci-patches/argocd-rbac-patch.yaml)" | ||
env: | ||
ARGOCD_OIDC_CLIENT_SECRET: ${{ secrets.ARGOCD_OIDC_CLIENT_SECRET }} |
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
# Kubeclt patch to sync groups from keycloak | ||
# with ArgoCD roles | ||
# To add a new group, add a new line to the | ||
# policy.csv file using the format | ||
# g, <group name>, role:<role name> | ||
# Where <group name> is the name of the group | ||
# in keycloak and <role name> is the name of | ||
# the role in ArgoCD | ||
# Apply this patch with: | ||
# kubectl -n argocd patch configmap argocd-rbac-cm --patch "$(cat ci-patches/argocd-rbac-patch.yaml)" | ||
data: | ||
policy.csv: | | ||
g, ReadOnly, role:readonly | ||
g, ArgoAdmin, role:admin |