Skip to content

Commit

Permalink
Merge pull request #51 from upbound/backport-43-to-release-1.9
Browse files Browse the repository at this point in the history
[Backport release-1.9] Set UPBOUND_CONTEXT env var in provider deployment
  • Loading branch information
hasheddan authored Aug 7, 2022
2 parents b42eaf1 + 7cdbc39 commit 0507da3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions internal/controller/pkg/revision/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ const (
webhookTLSCertDir = "/webhook/tls"
webhookPortName = "webhook"
webhookPort = 9443

upboundCTXEnv = "UPBOUND_CONTEXT"
upboundCTXValue = "uxp"
)

func buildProviderDeployment(provider *pkgmetav1.Provider, revision v1.PackageRevision, cc *v1alpha1.ControllerConfig, namespace string) (*corev1.ServiceAccount, *appsv1.Deployment, *corev1.Service) { // nolint:gocyclo
Expand Down Expand Up @@ -125,6 +128,10 @@ func buildProviderDeployment(provider *pkgmetav1.Provider, revision v1.PackageRe
},
},
},
{
Name: upboundCTXEnv,
Value: upboundCTXValue,
},
},
},
},
Expand Down
4 changes: 4 additions & 0 deletions internal/controller/pkg/revision/deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ func deployment(provider *pkgmetav1.Provider, revision string, img string, modif
},
},
},
{
Name: upboundCTXEnv,
Value: upboundCTXValue,
},
},
},
},
Expand Down

0 comments on commit 0507da3

Please sign in to comment.