mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #1551 from brendandburns/fix
Fix error detection. (a better fix is coming)
This commit is contained in:
commit
446bcd468e
@ -78,7 +78,7 @@ func (e *EndpointController) SyncServiceEndpoints() error {
|
|||||||
currentEndpoints, err := e.client.GetEndpoints(nsCtx, service.ID)
|
currentEndpoints, err := e.client.GetEndpoints(nsCtx, service.ID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO this is brittle as all get out, refactor the client libraries to return a structured error.
|
// TODO this is brittle as all get out, refactor the client libraries to return a structured error.
|
||||||
if strings.Contains(err.Error(), "(404)") {
|
if strings.Contains(err.Error(), "404") {
|
||||||
currentEndpoints = &api.Endpoints{
|
currentEndpoints = &api.Endpoints{
|
||||||
JSONBase: api.JSONBase{
|
JSONBase: api.JSONBase{
|
||||||
ID: service.ID,
|
ID: service.ID,
|
||||||
|
Loading…
Reference in New Issue
Block a user