
io.fabric8.kubernetes.client.extended.run.RunConfig Maven / Gradle / Ivy
/*
* Copyright (C) 2015 Red Hat, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.fabric8.kubernetes.client.extended.run;
import io.fabric8.kubernetes.api.model.Quantity;
import io.sundr.builder.annotations.Buildable;
import java.util.List;
import java.util.Map;
/**
* Configuration for client run
*/
public class RunConfig {
/**
* Name of resource
*/
private String name;
/**
* Image to use
*/
private String image;
/**
* ImagePullPolicy to be used
*/
private String imagePullPolicy;
/**
* Command to use instead of the default
*/
private String command;
/**
* Arguments for the default or provided command.
*
*
* If command
is present, these will be used as extra arguments for the command. If not,
* these will be set in the args container configuration.
*/
private List args;
/**
* Pod restart policy
*/
private String restartPolicy;
/**
* Service Account name to be used
*/
private String serviceAccount;
/**
* labels to add
*/
private Map labels;
/**
* Environment variables to be add
*/
private Map env;
/**
* Resource limits
*/
private Map limits;
/**
* Resource requests
*/
private Map requests;
/**
* Port to use
*/
private int port;
@SuppressWarnings("java:S107")
@Buildable(builderPackage = "io.fabric8.kubernetes.api.builder")
public RunConfig(String name, String image, String imagePullPolicy, String command, List args, String restartPolicy,
String serviceAccount, Map labels, Map env, Map limits,
Map requests, int port) {
this.name = name;
this.image = image;
this.imagePullPolicy = imagePullPolicy;
this.command = command;
this.args = args;
this.restartPolicy = restartPolicy;
this.serviceAccount = serviceAccount;
this.labels = labels;
this.env = env;
this.limits = limits;
this.requests = requests;
this.port = port;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getImagePullPolicy() {
return imagePullPolicy;
}
public void setImagePullPolicy(String imagePullPolicy) {
this.imagePullPolicy = imagePullPolicy;
}
public String getCommand() {
return command;
}
public void setCommand(String command) {
this.command = command;
}
public List getArgs() {
return args;
}
public void setArgs(List args) {
this.args = args;
}
public String getRestartPolicy() {
return restartPolicy;
}
public void setRestartPolicy(String restartPolicy) {
this.restartPolicy = restartPolicy;
}
public String getServiceAccount() {
return serviceAccount;
}
public void setServiceAccount(String serviceAccount) {
this.serviceAccount = serviceAccount;
}
public Map getLabels() {
return labels;
}
public void setLabels(Map labels) {
this.labels = labels;
}
public Map getEnv() {
return env;
}
public void setEnv(Map env) {
this.env = env;
}
public Map getLimits() {
return limits;
}
public void setLimits(Map limits) {
this.limits = limits;
}
public Map getRequests() {
return requests;
}
public void setRequests(Map requests) {
this.requests = requests;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
}