Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow v3 add support for serviceaccountname securitycontext #279

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/main/java/io/boomerang/model/controller/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ public abstract class Task {

@JsonProperty("workspaces")
private List<TaskWorkspace> workspaces;

@JsonProperty("serviceAccountName")
private String serviceAccountName;

@JsonProperty("securityContext")
private String securityContext;

public String getWorkflowName() {
return workflowName;
Expand Down Expand Up @@ -213,4 +219,20 @@ public List<TaskWorkspace> getWorkspaces() {
public void setWorkspaces(List<TaskWorkspace> workspaces) {
this.workspaces = workspaces;
}

public String getServiceAccountName() {
return serviceAccountName;
}

public void setServiceAccountName(String serviceAccountName) {
this.serviceAccountName = serviceAccountName;
}

public String getSecurityContext() {
return securityContext;
}

public void setSecurityContext(String securityContext) {
this.securityContext = securityContext;
}
}
85 changes: 85 additions & 0 deletions src/main/java/io/boomerang/model/tekton/Capabilities.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package io.boomerang.model.tekton;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"add",
"drop"
})
public class Capabilities {

@JsonProperty("add")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> add = new ArrayList<String>();
@JsonProperty("drop")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<String> drop = new ArrayList<String>();
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

/**
* No args constructor for use in serialization
*
*/
public Capabilities() {
}

/**
*
* @param add
* @param drop
*/
public Capabilities(List<String> add, List<String> drop) {
super();
this.add = add;
this.drop = drop;
}

@JsonProperty("add")
public List<String> getAdd() {
return add;
}

@JsonProperty("add")
public void setAdd(List<String> add) {
this.add = add;
}

@JsonProperty("drop")
public List<String> getDrop() {
return drop;
}

@JsonProperty("drop")
public void setDrop(List<String> drop) {
this.drop = drop;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

}

111 changes: 111 additions & 0 deletions src/main/java/io/boomerang/model/tekton/SELinuxOptions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
package io.boomerang.model.tekton;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"level",
"role",
"type",
"user"
})
public class SELinuxOptions {

@JsonProperty("level")
private String level;
@JsonProperty("role")
private String role;
@JsonProperty("type")
private String type;
@JsonProperty("user")
private String user;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

/**
* No args constructor for use in serialization
*
*/
public SELinuxOptions() {
}

/**
*
* @param role
* @param level
* @param type
* @param user
*/
public SELinuxOptions(String level, String role, String type, String user) {
super();
this.level = level;
this.role = role;
this.type = type;
this.user = user;
}

@JsonProperty("level")
public String getLevel() {
return level;
}

@JsonProperty("level")
public void setLevel(String level) {
this.level = level;
}

@JsonProperty("role")
public String getRole() {
return role;
}

@JsonProperty("role")
public void setRole(String role) {
this.role = role;
}

@JsonProperty("type")
public String getType() {
return type;
}

@JsonProperty("type")
public void setType(String type) {
this.type = type;
}

@JsonProperty("user")
public String getUser() {
return user;
}

@JsonProperty("user")
public void setUser(String user) {
this.user = user;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

}

81 changes: 81 additions & 0 deletions src/main/java/io/boomerang/model/tekton/SeccompProfile.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package io.boomerang.model.tekton;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

@JsonDeserialize(using = com.fasterxml.jackson.databind.JsonDeserializer.None.class)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"apiVersion",
"kind",
"metadata",
"localhostProfile",
"type"
})
public class SeccompProfile {

@JsonProperty("localhostProfile")
private String localhostProfile;
@JsonProperty("type")
private String type;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();

/**
* No args constructor for use in serialization
*
*/
public SeccompProfile() {
}

/**
*
* @param localhostProfile
* @param type
*/
public SeccompProfile(String localhostProfile, String type) {
super();
this.localhostProfile = localhostProfile;
this.type = type;
}

@JsonProperty("localhostProfile")
public String getLocalhostProfile() {
return localhostProfile;
}

@JsonProperty("localhostProfile")
public void setLocalhostProfile(String localhostProfile) {
this.localhostProfile = localhostProfile;
}

@JsonProperty("type")
public String getType() {
return type;
}

@JsonProperty("type")
public void setType(String type) {
this.type = type;
}

@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}

@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}

}

Loading
Loading