Documentation
¶
Overview ¶
Package features provides example mutations for the mutations-and-gating example.
Index ¶
- func BackwardCompatV1Container(version string) deployment.Mutation
- func DebugLoggingMutation(enabled bool) deployment.Mutation
- func MetricsConfigMutation(version string, enableMetrics bool) configmap.Mutation
- func MustConstraint(expr string) feature.VersionConstraint
- func TracingSidecarMutation(enabled bool) deployment.Mutation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackwardCompatV1Container ¶
func BackwardCompatV1Container(version string) deployment.Mutation
BackwardCompatV1Container rolls the v2 baseline back to the v1 container layout for versions before 2.0.0. In v1, the container was named "server" and only exposed the HTTP port.
Backward compatibility mutations are named BackwardCompat<version> so the pattern is immediately recognizable. When multiple backward compat mutations exist, register the newest first (closest to the baseline) and the oldest last. See the guidelines for details.
func DebugLoggingMutation ¶
func DebugLoggingMutation(enabled bool) deployment.Mutation
DebugLoggingMutation sets LOG_LEVEL=debug on the application container when enabled. It targets selectors.ContainerNamed with the baseline name "app", so it must be registered before any backward compat mutation that renames the container. The edit carries through the rename because backward compat mutations only overwrite specific fields (Name, Ports), not the environment.
func MetricsConfigMutation ¶
MetricsConfigMutation adds a Prometheus metrics section to app.yaml. It is boolean-gated on the enableMetrics flag.
func MustConstraint ¶
func MustConstraint(expr string) feature.VersionConstraint
MustConstraint parses a semver constraint expression or panics.
func TracingSidecarMutation ¶
func TracingSidecarMutation(enabled bool) deployment.Mutation
TracingSidecarMutation injects a Jaeger sidecar and sets JAEGER_AGENT_HOST on all containers. It is boolean-gated on the enableTracing flag.
Types ¶
This section is empty.