You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -149,27 +152,34 @@ We are proposing to add a new endpoint, /flagz on all core Kubernetes components
149
152
150
153
### Data Format and versioning
151
154
152
-
Initially, the flagz page will exclusively support a plain text format for responses. In future, when we have established a structured schema for the response, we can support specifying a version param, like /flagz?version=2, to ensure future compatibility. Through this, we can evolve the endpoint and introduce changes to the response schema without impacting clients relying on previous versions, ensuring backward compatibility.
155
+
The `flagz` endpoint will use content negotiation via the `Accept` header. The default response format is `text/plain`.
156
+
157
+
-**Alpha**: The endpoint will only serve the `text/plain` format. Any `Accept` header requesting a different format will be ignored, and the response will default to `text/plain`.
158
+
-**Beta**: The endpoint will be enhanced to serve a structured `application/json` format in addition to `text/plain`. Clients will be able to request a specific version of the JSON response (e.g., `application/json;v=v1`).
159
+
160
+
This phased approach ensures that the initial implementation is simple and focused on human-readability, while providing a clear path for machine-readable, versioned responses in the future.
153
161
154
162
### Authz and authn
155
163
156
164
Access to the endpoint will be limited to members of the `system:monitoring group` ([ref](https://github.com/kubernetes/kubernetes/blob/release-1.31/staging/src/k8s.io/apiserver/pkg/authentication/user/user.go#L73)), which is how paths like /healthz, /livez, /readyz are restricted today.
157
165
158
166
### Endpoint Response Format
159
167
160
-
#### Data format : text
168
+
#### Data format : text (Alpha, Beta, GA)
169
+
170
+
This is the default format.
161
171
162
-
#### Request
172
+
#####Request
163
173
* Method: **GET**
164
174
* Endpoint: **/flagz**
165
-
* Header: `Content-Type: text/plain`
175
+
* Header: `Accept: text/plain` (or omitted)
166
176
* Body: empty
167
177
168
-
#### Response fields
178
+
#####Response fields
169
179
***Flag Name**: The name of the command-line flag or configuration option
170
180
***Value**: The current value assigned to the flag at runtime
0 commit comments