Skip to content

Commit

Permalink
refactor/fix: use primaryIngress as label name (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon authored Jan 5, 2023
1 parent e1c7f8f commit 9281bcb
Show file tree
Hide file tree
Showing 22 changed files with 21 additions and 23 deletions.
2 changes: 0 additions & 2 deletions internal/generator/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,6 @@ func composeToServiceValues(
}
return cService, nil
}
// service is not destined for Lagoon, return null
return ServiceValues{}, nil
}

// getDBaasEnvironment will check the dbaas provider to see if an environment exists or not
Expand Down
2 changes: 1 addition & 1 deletion internal/templating/ingress/templates_ingress.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ 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"
additionalLabels["lagoon.sh/primaryIngress"] = "true"

// only add the monitring annotations if monitoring is enabled
additionalAnnotations["monitor.stakater.com/enabled"] = "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +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/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,7 +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/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,7 +27,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main2
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: production
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +29,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +29,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +26,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: multiproject
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: multiproject
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: branch-routes
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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,7 +25,7 @@ metadata:
lagoon.sh/buildType: branch
lagoon.sh/environment: main
lagoon.sh/environmentType: production
lagoon.sh/primaryingress: "true"
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 9281bcb

Please sign in to comment.