|
1 | | -package it.aboutbits.postgresql.core; |
2 | | - |
3 | | -import io.fabric8.generator.annotation.Required; |
4 | | -import io.fabric8.generator.annotation.ValidationRule; |
5 | | -import lombok.Getter; |
6 | | -import lombok.Setter; |
7 | | -import org.jspecify.annotations.NullMarked; |
8 | | - |
9 | | -/// A reference to a file inside the operator container. |
10 | | -/// |
11 | | -/// This class is used wherever a CRD spec needs to point to a specific file |
12 | | -/// The [#path] field identifies the file location within the container. |
13 | | -/// |
14 | | -/// ### Example usage in a CR manifest |
15 | | -/// |
16 | | -/// ```yaml |
17 | | -/// spec: |
18 | | -/// adminSecretFileRef: |
19 | | -/// path: "/mnt/secrets/db-credentials.json" |
20 | | -/// ``` |
21 | | -@Getter |
22 | | -@Setter |
23 | | -@NullMarked |
24 | | -public class FileRef { |
25 | | - /// The path to the file. |
26 | | - /// Must not be blank. |
27 | | - @Required |
28 | | - @ValidationRule( |
29 | | - value = "self.trim().size() > 0", |
30 | | - message = "The path must not be empty." |
31 | | - ) |
32 | | - private String path = ""; |
33 | | -} |
| 1 | +package it.aboutbits.postgresql.core; |
| 2 | + |
| 3 | +import io.fabric8.generator.annotation.Required; |
| 4 | +import io.fabric8.generator.annotation.ValidationRule; |
| 5 | +import lombok.Getter; |
| 6 | +import lombok.Setter; |
| 7 | +import org.jspecify.annotations.NullMarked; |
| 8 | + |
| 9 | +/// A reference to a file inside the operator container. |
| 10 | +/// |
| 11 | +/// This class is used wherever a CRD spec needs to point to a specific file |
| 12 | +/// The [#path] field identifies the file location within the container. |
| 13 | +/// |
| 14 | +/// ### Example usage in a CR manifest |
| 15 | +/// |
| 16 | +/// ```yaml |
| 17 | +/// spec: |
| 18 | +/// adminSecretFileRef: |
| 19 | +/// path: "/mnt/secrets/db-credentials.json" |
| 20 | +/// ``` |
| 21 | +@Getter |
| 22 | +@Setter |
| 23 | +@NullMarked |
| 24 | +public class FileRef { |
| 25 | + /// The path to the file. |
| 26 | + /// Must not be blank. |
| 27 | + @Required |
| 28 | + @ValidationRule( |
| 29 | + value = "self.trim().size() > 0", |
| 30 | + message = "The path must not be empty." |
| 31 | + ) |
| 32 | + private String path = ""; |
| 33 | +} |
0 commit comments