Skip to content

Commit 88563eb

Browse files
authored
make DefaultKafkaRuntimeImage value replacable in link time (#4113)
1 parent dc2ae52 commit 88563eb

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

‎pkg/k8s/deployer.go‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,6 @@ const (
4242
DefaultReadinessEndpoint = "/health/readiness"
4343
DefaultHTTPPort = 8080
4444

45-
// DefaultKafkaRuntimeImage is the image injected as the Kafka runtime
46-
// sidecar. It consumes from Kafka and delivers each record to the function
47-
// over localhost HTTP, so the function needs no Kafka client. Override with
48-
// the FUNC_KAFKA_RUNTIME_IMAGE environment variable.
49-
//
50-
// This points at the released image published from the func-adapter-kafka
51-
// release-0.1 branch. The runtime is versioned on its own line like the
52-
// other func middleware (func-go, func-python), independent of func and the
53-
// knative release train. Pin a different version or fall back to the nightly
54-
// build via FUNC_KAFKA_RUNTIME_IMAGE.
55-
DefaultKafkaRuntimeImage = "gcr.io/knative-releases/knative.dev/func-adapter-kafka/cmd/fkafka-runtime:v0.1.0"
56-
5745
// kafkaRuntimeImageEnv overrides DefaultKafkaRuntimeImage at deploy time.
5846
kafkaRuntimeImageEnv = "FUNC_KAFKA_RUNTIME_IMAGE"
5947

@@ -101,6 +89,19 @@ const (
10189
managedByValue = "func-raw-deployer"
10290
)
10391

92+
// DefaultKafkaRuntimeImage is the image injected as the Kafka runtime
93+
// sidecar. It consumes from Kafka and delivers each record to the function
94+
// over localhost HTTP, so the function needs no Kafka client. Override with
95+
// the FUNC_KAFKA_RUNTIME_IMAGE environment variable or at build time with
96+
// ldflags.
97+
//
98+
// This points at the released image published from the func-adapter-kafka
99+
// release-0.1 branch. The runtime is versioned on its own line like the
100+
// other func middleware (func-go, func-python), independent of func and the
101+
// knative release train. Pin a different version or fall back to the nightly
102+
// build via FUNC_KAFKA_RUNTIME_IMAGE.
103+
var DefaultKafkaRuntimeImage = "gcr.io/knative-releases/knative.dev/func-adapter-kafka/cmd/fkafka-runtime:v0.1.0"
104+
104105
type DeployerOpt func(*Deployer)
105106

106107
type Deployer struct {

0 commit comments

Comments
 (0)