Explorar o código

changes to show https issuer status (#4569)

Yosef Mihretie %!s(int64=2) %!d(string=hai) anos
pai
achega
99309849f7
Modificáronse 1 ficheiros con 6 adicións e 10 borrados
  1. 6 10
      api/types/system_service_status.go

+ 6 - 10
api/types/system_service_status.go

@@ -134,27 +134,23 @@ func toSystemService(apiSystemService *porterv1.SystemService) (SystemService, e
 	if apiSystemService == nil {
 		return SystemService{}, errors.New("unexpected nil: SystemService")
 	}
-	involvedObjectType, err := toInternalInvolvedObjectType(apiSystemService.InvolvedObjectType)
-	if err != nil {
-		return SystemService{}, err
-	}
 	return SystemService{
 		Name:               apiSystemService.Name,
 		Namespace:          apiSystemService.Namespace,
-		InvolvedObjectType: involvedObjectType,
+		InvolvedObjectType: toInternalInvolvedObjectType(apiSystemService.InvolvedObjectType),
 	}, nil
 }
 
-func toInternalInvolvedObjectType(apiType porterv1.InvolvedObjectType) (InvolvedObjectType, error) {
+func toInternalInvolvedObjectType(apiType porterv1.InvolvedObjectType) InvolvedObjectType {
 	switch apiType {
 	case porterv1.InvolvedObjectType_INVOLVED_OBJECT_TYPE_DEPLOYMENT:
-		return ServiceDeployment, nil
+		return ServiceDeployment
 	case porterv1.InvolvedObjectType_INVOLVED_OBJECT_TYPE_STATEFULSET:
-		return ServiceStatefulSet, nil
+		return ServiceStatefulSet
 	case porterv1.InvolvedObjectType_INVOLVED_OBJECT_TYPE_DAEMONSET:
-		return ServiceDaemonSet, nil
+		return ServiceDaemonSet
 	default:
-		return "", fmt.Errorf("unknown involved object type")
+		return ""
 	}
 }