Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from qpoint-io/enable-local-dev-workflow
Browse files Browse the repository at this point in the history
Allow setting the api endpoint for local development workflows
  • Loading branch information
tylerflint authored Jan 2, 2024
2 parents 31cfed3 + d060688 commit 3ece9e4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/v1/egress.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,14 @@ func MutateInjection(pod *corev1.Pod, config *Config) error {
})
}

// API_ENDPOINT
if apiEndpoint := config.GetAnnotation("api-endpoint"); apiEndpoint != "" {
qtapContainer.Env = append(qtapContainer.Env, corev1.EnvVar{
Name: "ENDPOINT",
Value: apiEndpoint,
})
}

// append to the list
pod.Spec.Containers = append(pod.Spec.Containers, qtapContainer)

Expand Down

0 comments on commit 3ece9e4

Please sign in to comment.