Skip to content

Commit 6f38fe6

Browse files
committed
change default port of in-process evaluation to 8015
Signed-off-by: odubajDT <[email protected]>
1 parent 0d754f4 commit 6f38fe6

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

apis/core/v1beta1/common/common.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const (
3636
ProbesEnabledVar string = "PROBES_ENABLED"
3737
DefaultEnvVarPrefix string = "FLAGD"
3838
DefaultManagementPort int32 = 8014
39-
DefaultPort int32 = 8013
39+
DefaultRPCPort int32 = 8013
40+
DefaultInProcessPort int32 = 8015
4041
DefaultEvaluator string = "json"
4142
DefaultLogFormat string = "json"
4243
DefaultProbesEnabled bool = true

apis/core/v1beta1/featureflaginprocessconfiguration_types.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ import (
2626

2727
// FeatureFlagInProcessConfigurationSpec defines the desired state of FeatureFlagInProcessConfiguration
2828
type FeatureFlagInProcessConfigurationSpec struct {
29-
// Port defines the port to listen on, defaults to 8013
30-
// +kubebuilder:default:=8013
29+
// Port defines the port to listen on, defaults to 8015
30+
// +kubebuilder:default:=8015
3131
// +optional
3232
Port int32 `json:"port"`
3333

@@ -113,7 +113,7 @@ func (fc *FeatureFlagInProcessConfigurationSpec) Merge(new *FeatureFlagInProcess
113113
fc.EnvVars = common.RemoveDuplicateEnvVars(fc.EnvVars)
114114
}
115115

116-
if new.Port != common.DefaultPort {
116+
if new.Port != common.DefaultInProcessPort {
117117
fc.Port = new.Port
118118
}
119119
if new.SocketPath != "" {
@@ -159,7 +159,7 @@ func (fc *FeatureFlagInProcessConfigurationSpec) ToEnvVars() []corev1.EnvVar {
159159
})
160160
}
161161

162-
if fc.Port != common.DefaultPort {
162+
if fc.Port != common.DefaultInProcessPort {
163163
envs = append(envs, corev1.EnvVar{
164164
Name: common.EnvVarKey(fc.EnvVarPrefix, common.PortEnvVar),
165165
Value: fmt.Sprintf("%d", fc.Port),
@@ -208,7 +208,7 @@ func (fc *FeatureFlagInProcessConfigurationSpec) ToEnvVars() []corev1.EnvVar {
208208
})
209209
}
210210

211-
// sets the FLAGD_RESOLVER var to "in-process" to configure the provider for in-process evaluation mode
211+
// sets the FLAGD_RESOLVER var to "in-process" to configure the provider for in-process evaluation mode
212212
envs = append(envs, corev1.EnvVar{
213213
Name: common.EnvVarKey(fc.EnvVarPrefix, common.ResolverEnvVar),
214214
Value: common.InProcessResolverType,

apis/core/v1beta1/featureflagsource_types.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func (fc *FeatureFlagSourceSpec) ToEnvVars() []corev1.EnvVar {
221221
})
222222
}
223223

224-
if fc.Port != common.DefaultPort {
224+
if fc.Port != common.DefaultRPCPort {
225225
envs = append(envs, corev1.EnvVar{
226226
Name: common.EnvVarKey(fc.EnvVarPrefix, common.PortEnvVar),
227227
Value: fmt.Sprintf("%d", fc.Port),
@@ -249,7 +249,7 @@ func (fc *FeatureFlagSourceSpec) ToEnvVars() []corev1.EnvVar {
249249
})
250250
}
251251

252-
// sets the FLAGD_RESOLVER var to "rpc" to configure the provider for RPC evaluation mode
252+
// sets the FLAGD_RESOLVER var to "rpc" to configure the provider for RPC evaluation mode
253253
envs = append(envs, corev1.EnvVar{
254254
Name: common.EnvVarKey(fc.EnvVarPrefix, common.ResolverEnvVar),
255255
Value: common.RPCResolverType,

config/crd/bases/core.openfeature.dev_featureflaginprocessconfigurations.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ spec:
175175
description: OfflineFlagSourcePath
176176
type: string
177177
port:
178-
default: 8013
179-
description: Port defines the port to listen on, defaults to 8013
178+
default: 8015
179+
description: Port defines the port to listen on, defaults to 8015
180180
format: int32
181181
type: integer
182182
selector:

docs/crds.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ FeatureFlagInProcessConfigurationSpec defines the desired state of FeatureFlagIn
143143
<td><b>port</b></td>
144144
<td>integer</td>
145145
<td>
146-
Port defines the port to listen on, defaults to 8013<br/>
146+
Port defines the port to listen on, defaults to 8015<br/>
147147
<br/>
148148
<i>Format</i>: int32<br/>
149-
<i>Default</i>: 8013<br/>
149+
<i>Default</i>: 8015<br/>
150150
</td>
151151
<td>false</td>
152152
</tr><tr>

webhooks/common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func NewFeatureFlagSourceSpec(env types.EnvConfig) *api.FeatureFlagSourceSpec {
8787

8888
func NewFeatureFlagInProcessConfigurationSpec() *api.FeatureFlagInProcessConfigurationSpec {
8989
return &api.FeatureFlagInProcessConfigurationSpec{
90-
Port: apicommon.DefaultPort,
90+
Port: apicommon.DefaultRPCPort,
9191
SocketPath: "",
9292
Host: apicommon.DefaultHost,
9393
TLS: false,

0 commit comments

Comments
 (0)