Skip to content

Commit

Permalink
chore: add primaryingress label to primary ingress (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Jan 3, 2023
1 parent 6a2f975 commit e1c7f8f
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 0 deletions.
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"
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

0 comments on commit e1c7f8f

Please sign in to comment.