Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add primaryingress label to primary ingress #153

Merged
merged 2 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/templating/ingress/templates_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ func GenerateIngressTemplate(
// check if monitoring enabled, route isn't autogenerated, and the primary ingress from the .lagoon.yml is this processed routedomain
// and enable monitoring on the primary ingress only.
if lValues.Monitoring.Enabled && !route.Autogenerated && primaryIngress.Host == routeDomain {
additionalLabels["lagoon.sh/primaryingress"] = "true"

// only add the monitring annotations if monitoring is enabled
additionalAnnotations["monitor.stakater.com/enabled"] = "true"
additionalAnnotations["uptimerobot.monitor.stakater.com/alert-contacts"] = "unconfigured"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: environment-with-really-really-reall-3fdb
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: extra-long-name-f6c8a
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: environment-with-really-really-reall-3fdb
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
shreddedbacon marked this conversation as resolved.
Show resolved Hide resolved
lagoon.sh/project: example-project
lagoon.sh/service: extra-long-name-f6c8a
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main2
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: standby.example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: production
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: content-example-com
lagoon.sh/service: content.example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: test1.example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: multiproject
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: multiproject1
lagoon.sh/service: multiproject1.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: multiproject
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: multiproject2
lagoon.sh/service: multiproject2.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: example.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: branch-routes
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: customdomain-will-be-main-domain.com
lagoon.sh/service-type: custom-ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
lagoon.sh/project: example-project
lagoon.sh/service: active.example.com
lagoon.sh/service-type: custom-ingress
Expand Down