Retrieves and lists all Ingresses configured on Pergola, per Project/Stage/Component, including their network and auth configurations, if available.
- Create a new Project pointing to this Git repo
- Trigger a new Build
- Create a new Stage
- Let your Pergola admin know that you need special permissions for the Identity defined in pergola.yaml
- You can also skip this step and deploy first
- See required permissions below
- (optional) Add a new Configuration to Stage:
- If you want the app to automatically create links to Pergola UI, add this entry to the config:
- PERGOLA_UI_URL: <url of your Pergola UI installation, e.g. https://console.pergola.mycompany.com>
- Deploy
This app defines an Identity which requires access to K8s resources at runtime with at least following permissions:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: ingress-browser
rules:
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get", "list"]
This ClusterRole
needs to be setup by a Pergola admin.
As soon as the Stage exists a Pergola admin can link the Pergola Identity to the ClusterRole above. Here is a template for the binding:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: ingress-browser
roleRef:
kind: ClusterRole
name: ingress-browser
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: ingress-browser # as defined in pergola.yaml
namespace: # of project/stage
This can be done before or after deployment. As long as this role binding is not in place, the app will report "permission denied".
Note: You need a local ~/.kube/config
with at least the permission to get and list Ingresses on Kubernetes (see required permissions above).
Requires Python >= 3.8
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
flask --app app run --debug
docker compose build
docker compose up