Closed MbolotSuse closed 1 week ago
I see the same for monitoring.coreos.com.alertmanagerconfig
, brought in via the monitoring app. It should work for non-core rancher crds?
@richard-cox Keep in mind that a temporary 503 is expected behavior. When a new CRD is added there may be some time between when the installation occurs and when the definition is available. However, this should resolve shortly (matter of seconds). This issue is about resources that are constant 503s that never resolve - that part is a bug. Since the resource type that you mentioned here isn't available in core rancher, it is subject to possible, temporary 503.
That being said, trying it on my local it looks like that resource is part of the indefinite 503s, so I'll aim to fix it as part of this ticket.
This ticket will only aim to fix the permanent 503. LMK if you have any follow-up questions.
Unfortunately the 503 isn't temporary and is always returned. I didn't try on the local cluster, but see it on a downstream one.
/k8s/clusters/<cluster id>/v1/schemas/monitoring.coreos.com.alertmanagerconfig
returns ok/k8s/clusters/<cluster id>/v1/schemadefinitions/monitoring.coreos.com.alertmanagerconfig
always 503'sThe schema definitions has a few bugs that can cause the definition to not be available for a schema, or to not be accurate for a schema:
v1alpha1
) but not in the preferred version of the group (e.x. v1
) were not included in the model cache used by the definition handler. This caused 503 errors since there was a schema for these resources, but there was no accessible model (so no definition). monitoring.coreos.com.alertmanagerconfig
appears to be one of these resources - it's in the v1alpha1
group, but missing from the v1
group, and the v1
group is the preferred group. In these cases, steve should have the definition from the group that's present, even though it's not the preferred group.generateKubeconfigOutput
is one of these resources.proto.Map
instead of a proto.Kind
, and since we only process proto.Kind
objects (which represent root/top-level objects) we don't produce a definition for these objects, resulting in the 503 error. This is likely the root cause of the 503 on many of the management.cattle.io
types, including management.cattle.io.userattribute
. This will mostly be addressed by the fix for #45157.As explained in the above issue summary, there were a few issues with how schema definitions were formed.
monitoring.coreos.com.alertmanagerconfig
) existed in one version of a group (e.x. v1alpha1
) but not in the preferred version of the group (e.x. v1
), we would return a 503 error, and not produce a definition for the schema. counts
, and generateKubeConfigOutput
). These items would return a 503 error and not produce a definition when the definition was requested for that type.Note that the 3rd issue mentioned in the summary was not fixed here.
generateKubeconfigOutput
which aren't i the openapi doc.
/v1/schemas
.counts
has a type map[string]itemCount
. This appears to function the same as 2.8 (I did not find a distinct schema for itemCount on 2.8)monitoring.coreos.com.alertmanagerconfig
resource (which is available in the rancher-monitoring chart) is a good example.Schema definitions for the above cases, and for the previously working endpoints.
N/A - see the original issue for more details.
Validated with v2.9-ddabf6b2266255276352beb1eeb740d9e4de802d-head
Rancher Server Setup
c9be13b09329bbee60a5f6419d500198f83c44d1
Information about the Cluster
User Information
Describe the bug When attempting to get the schema definitions for certain resources, specific resources always return a 503, even after a significant amount of time has passed. Below is the list of resources provided by @Priyashetty17:
To Reproduce
rancher/rancher:v2.9-head
Result A 503 response is returned.
Expected Result An object should be returned, with the same fields provided by the 2.8 schema object.
Screenshots N/A
Additional context It is possible that some of these objects are being seen as "abitrary" objects since the definitions are minimal.