-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d52e4c2
commit 2242c4d
Showing
5 changed files
with
135 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...ator/model/src/main/java/io/apicurio/registry/operator/api/v1/spec/NetworkPolicySpec.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package io.apicurio.registry.operator.api.v1.spec; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import com.fasterxml.jackson.annotation.JsonPropertyDescription; | ||
import com.fasterxml.jackson.annotation.JsonPropertyOrder; | ||
import com.fasterxml.jackson.annotation.JsonSetter; | ||
import com.fasterxml.jackson.annotation.Nulls; | ||
import com.fasterxml.jackson.databind.JsonDeserializer.None; | ||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; | ||
import lombok.AllArgsConstructor; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
import lombok.experimental.SuperBuilder; | ||
|
||
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; | ||
import static lombok.AccessLevel.PRIVATE; | ||
|
||
@JsonDeserialize(using = None.class) | ||
@JsonInclude(NON_NULL) | ||
@JsonPropertyOrder({ "enabled" }) | ||
@NoArgsConstructor | ||
@AllArgsConstructor(access = PRIVATE) | ||
@SuperBuilder(toBuilder = true) | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode | ||
@ToString | ||
public class NetworkPolicySpec { | ||
|
||
/** | ||
* Indicates whether to create and manage a network policy | ||
*/ | ||
@JsonProperty("enabled") | ||
@JsonPropertyDescription(""" | ||
Whether a NetworkPolicy should be managed by the operator. Defaults to 'true'. | ||
Set this to 'false' if you want to create your own custom NetworkPolicy. | ||
""") | ||
@JsonSetter(nulls = Nulls.SKIP) | ||
private Boolean enabled; | ||
|
||
} |