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
KubeFlowSchema resource from src/imports/k8s.ts file, is reliant on a Subject interface that is using the wrong object layout. - leading to invalid resource when trying to apply to kubernetes.
Instead it should be using the same Subject structure to the one used by KubeFlowSchemaV1Beta3.
Here is an example of proper resource with subjects:
Notice that the name and namespace fields, are hierarchical to group, user and serviceAccount and are not flat as mentioned in the structure of the Subject interface.
Alternatively to replacing the Subject structure, is to make sure the proper structure of the resource is generated when calling the toJson method - unlike passing the value as is which is what the code is doing.
The output structure of json for the above flowChart resource will fail to get applied, kubernetes will complain about the incorrect subject layout.
Error Log:
Error from server (BadRequest): error when creating "/tmp/manifest.yaml": FlowSchema in version "v1" cannot be handled as a FlowSchema: strict decoding error: unknown field "spec.rules[0].subjects[0].name", unknown field "spec.rules[0].subjects[0].namespace"\nError from server (BadRequest): error when creating "/tmp/manifest.yaml": FlowSchema in version "v1" cannot be handled as a FlowSchema: strict decoding error: unknown field "spec.rules[0].subjects[0].name", unknown field "spec.rules[0].subjects[0].namespace"
Environment:
Framework Version: 29, 30 and 31
OS: Linux
Other:
I suggest to properly structure the json objects to be compliant with FlowSchema V1 by restructuring the subjects layout properly where the name and namespace becomes child of serviceAccount, user and group.
The alternative is to fallback tot he approach taken by the V1Beta3 resource which structures the props correctly, so no manipulation or restructuring is required when converting to json.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered:
Description of the bug:
KubeFlowSchema resource from src/imports/k8s.ts file, is reliant on a Subject interface that is using the wrong object layout. - leading to invalid resource when trying to apply to kubernetes.
Instead it should be using the same Subject structure to the one used by KubeFlowSchemaV1Beta3.
Here is an example of proper resource with subjects:
Notice that the name and namespace fields, are hierarchical to group, user and serviceAccount and are not flat as mentioned in the structure of the Subject interface.
Alternatively to replacing the Subject structure, is to make sure the proper structure of the resource is generated when calling the toJson method - unlike passing the value as is which is what the code is doing.
Reproduction Steps:
Create a flowSchema like the bellow:
The output structure of json for the above flowChart resource will fail to get applied, kubernetes will complain about the incorrect subject layout.
Error Log:
Error from server (BadRequest): error when creating "/tmp/manifest.yaml": FlowSchema in version "v1" cannot be handled as a FlowSchema: strict decoding error: unknown field "spec.rules[0].subjects[0].name", unknown field "spec.rules[0].subjects[0].namespace"\nError from server (BadRequest): error when creating "/tmp/manifest.yaml": FlowSchema in version "v1" cannot be handled as a FlowSchema: strict decoding error: unknown field "spec.rules[0].subjects[0].name", unknown field "spec.rules[0].subjects[0].namespace"
Environment:
Other:
I suggest to properly structure the json objects to be compliant with FlowSchema V1 by restructuring the subjects layout properly where the name and namespace becomes child of serviceAccount, user and group.
The alternative is to fallback tot he approach taken by the V1Beta3 resource which structures the props correctly, so no manipulation or restructuring is required when converting to json.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: