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
A potential fix would be a custom JSON unmarshaler:
// UnmarshalJSON serializes a JSON string into a spec. This override is required to deal with the// MaxAge field which is special case because it's an object embedded into the spec.func (specTeleportOIDCConnectorSpec) UnmarshalJSON(data []byte) error {
typeAliasTeleportOIDCConnectorSpectemp:=struct {
MaxAge types.Duration`json:"max_age"`Alias
}{
Alias: (Alias)(spec),
}
iferr:=json.Unmarshal(data, &temp); err!=nil {
returntrace.Wrap(err, "unmarshalling custom teleport oidc connector spec")
}
spec.MaxAge=&types.MaxAge{Value: temp.MaxAge}
returnnil
}
Expected behavior:
I create a
teleport_oidc_connector
CR withspec.max_age
set and the operator reconciles it.Current behavior:
The operator fails to convert the resource:
Bug details:
spec.max_age
The text was updated successfully, but these errors were encountered: