open-feature / open-feature/open-feature-operator
The in-process flagd pod does not use the default value of FeatureFlagSource
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 315
- Forks
- 61
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 1
Description
Hi, open feature operator is nice tool.
I will report what I have noticed.
version: 0.7.0
I applied following manifest to deploy standalone flagd pod.
---
apiVersion: core.openfeature.dev/v1beta1
kind: FeatureFlagSource
metadata:
name: sample-sources
labels:
app: sample-flags
spec:
sources:
- source: test-flag
provider: kubernetes
---
apiVersion: core.openfeature.dev/v1beta1
kind: Flagd
metadata:
name: flagd
spec:
replicas: 1
serviceType: ClusterIP
serviceAccountName: default
featureFlagSource: sample-sources
As a result, flagd pod was generated with no default values used , as shown below.
kubectl describe pod flagd-5f4cfcb898-nwflf
Name: flagd-5f4cfcb898-nwflf
Namespace: default
Priority: 0
Service Account: default
Node: minikube/192.168.49.2
Start Time: Fri, 26 Jul 2024 11:20:38 +0900
Labels: app=flagd-in-process
app.kubernetes.io/managed-by=open-feature-operator
app.kubernetes.io/name=flagd
app.kubernetes.io/version=v0.10.3
pod-template-hash=5f4cfcb898
Annotations: <none>
Status: Running
IP: 10.244.0.71
IPs:
IP: 10.244.0.71
Controlled By: ReplicaSet/flagd-5f4cfcb898
Containers:
flagd:
Container ID: docker://7568edc4a1e1ce366da1579c7da1eee5c93c42354df089e8a6fcfa2870033e0f
Image: ghcr.io/open-feature/flagd:v0.10.3
Image ID: docker-pullable://ghcr.io/open-feature/flagd@sha256:cc87349925a1643cd3f6e4f894ef6b6b3139712baf78133f3aed70a6b66f69bd
Ports: 8014/TCP, 8013/TCP, 8016/TCP, 8015/TCP
Host Ports: 0/TCP, 0/TCP, 0/TCP, 0/TCP
SeccompProfile: RuntimeDefault
Args:
start
--management-port
0
--sources
[{"uri":"default/sample-flags","provider":"kubernetes"}]
State: Running
Started: Fri, 26 Jul 2024 11:20:39 +0900
Ready: True
Restart Count: 0
Limits:
cpu: 500m
memory: 64Mi
Requests:
cpu: 200m
memory: 32Mi
Environment:
_MANAGEMENT_PORT: 0
_PORT: 0
_EVALUATOR:
_LOG_FORMAT:
_RESOLVER: rpc
When creating a pod from a Flagd manifest, the default values listed below do not appear to be used.
In the current version, the default value must be set explicitly.
apiVersion: core.openfeature.dev/v1beta1
kind: Flagd
metadata:
name: flagd
spec:
# Fill default values
port: 8013
managementPort: 8014
envVarPrefix: FLAGD
replicas: 1
serviceType: ClusterIP
serviceAccountName: default
featureFlagSource: sample-sources
Thanks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked apis/core/v1beta1/featureflagsource_types.go file and trace how the Flagd manifest produces the pod arguments and environment values. Compare the generated pod with the documented defaults for port, managementPort, and envVarPrefix. Done means those defaults are applied when the fields are omitted, while explicit values continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100