Package io.skodjob.testframe.resources
Class ServiceAccountResource
java.lang.Object
io.skodjob.testframe.resources.ServiceAccountResource
- All Implemented Interfaces:
NamespacedResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>,ResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>
public class ServiceAccountResource
extends Object
implements NamespacedResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>
Implementation of ResourceType for specific kubernetes resource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreate(io.fabric8.kubernetes.api.model.ServiceAccount resource) Creates specificServiceAccountresourcevoidcreateInNamespace(String namespaceName, io.fabric8.kubernetes.api.model.ServiceAccount resource) Creates specificServiceAccountresource in Namespace specified by uservoidDeletesServiceAccountresource from Namespace in current contextvoiddeleteFromNamespace(String namespaceName, String resourceName) DeletesServiceAccountresource from Namespace specified by userio.fabric8.kubernetes.client.dsl.MixedOperation<?,?, ?> Get specific client for resorucegetKind()Kind of api resourcevoidReplacesServiceAccountresource usingConsumerfrom which is the currentServiceAccountresource updatedvoidreplaceInNamespace(String namespaceName, String resourceName, Consumer<io.fabric8.kubernetes.api.model.ServiceAccount> editor) ReplacesServiceAccountresource in Namespace specified by user, usingConsumerfrom which is the currentServiceAccountresource updatedvoidupdate(io.fabric8.kubernetes.api.model.ServiceAccount resource) Updates specificServiceAccountresourcevoidupdateInNamespace(String namespaceName, io.fabric8.kubernetes.api.model.ServiceAccount resource) Updates specificServiceAccountresource in Namespace specified by userbooleanwaitForDeletion(io.fabric8.kubernetes.api.model.ServiceAccount resource) Waits forServiceAccountto be deletedbooleanwaitForReadiness(io.fabric8.kubernetes.api.model.ServiceAccount resource) Waits forServiceAccountto be ready (created/running)
-
Constructor Details
-
ServiceAccountResource
public ServiceAccountResource()Constructor
-
-
Method Details
-
getKind
Kind of api resource- Specified by:
getKindin interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Returns:
- kind name
-
create
public void create(io.fabric8.kubernetes.api.model.ServiceAccount resource) Creates specificServiceAccountresource- Specified by:
createin interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
resource-ServiceAccountresource
-
getClient
public io.fabric8.kubernetes.client.dsl.MixedOperation<?,?, getClient()?> Get specific client for resoruce- Specified by:
getClientin interfaceNamespacedResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Specified by:
getClientin interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Returns:
- specific client
-
update
public void update(io.fabric8.kubernetes.api.model.ServiceAccount resource) Updates specificServiceAccountresource- Specified by:
updatein interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
resource-ServiceAccountresource that will be updated
-
delete
DeletesServiceAccountresource from Namespace in current context- Specified by:
deletein interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
resourceName- name of theServiceAccountthat will be deleted
-
replace
public void replace(String resourceName, Consumer<io.fabric8.kubernetes.api.model.ServiceAccount> editor) ReplacesServiceAccountresource usingConsumerfrom which is the currentServiceAccountresource updated- Specified by:
replacein interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
resourceName- name of theServiceAccountthat will be replacededitor-Consumercontaining updates to the resource
-
waitForReadiness
public boolean waitForReadiness(io.fabric8.kubernetes.api.model.ServiceAccount resource) Waits forServiceAccountto be ready (created/running)- Specified by:
waitForReadinessin interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
resource- resource- Returns:
- result of the readiness check
-
waitForDeletion
public boolean waitForDeletion(io.fabric8.kubernetes.api.model.ServiceAccount resource) Waits forServiceAccountto be deleted- Specified by:
waitForDeletionin interfaceResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
resource- resource- Returns:
- result of the deletion
-
createInNamespace
public void createInNamespace(String namespaceName, io.fabric8.kubernetes.api.model.ServiceAccount resource) Creates specificServiceAccountresource in Namespace specified by user- Specified by:
createInNamespacein interfaceNamespacedResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
namespaceName- Namespace, where the resource should be createdresource-ServiceAccountresource
-
updateInNamespace
public void updateInNamespace(String namespaceName, io.fabric8.kubernetes.api.model.ServiceAccount resource) Updates specificServiceAccountresource in Namespace specified by user- Specified by:
updateInNamespacein interfaceNamespacedResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
namespaceName- Namespace, where the resource should be updatedresource-ServiceAccountupdated resource
-
deleteFromNamespace
DeletesServiceAccountresource from Namespace specified by user- Specified by:
deleteFromNamespacein interfaceNamespacedResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
namespaceName- Namespace, where the resource should be deletedresourceName- name of theServiceAccountthat will be deleted
-
replaceInNamespace
public void replaceInNamespace(String namespaceName, String resourceName, Consumer<io.fabric8.kubernetes.api.model.ServiceAccount> editor) ReplacesServiceAccountresource in Namespace specified by user, usingConsumerfrom which is the currentServiceAccountresource updated- Specified by:
replaceInNamespacein interfaceNamespacedResourceType<io.fabric8.kubernetes.api.model.ServiceAccount>- Parameters:
namespaceName- Namespace, where the resource should be replacedresourceName- name of theServiceAccountthat will be replacededitor-Consumercontaining updates to the resource
-