Skip to content

Commit 3bcde90

Browse files
committed
add gitsync to dummy cluster
1 parent 3ab7a5f commit 3bcde90

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

crates/stackable-operator/crds/DummyCluster.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,77 @@ spec:
7575
domainName:
7676
description: A validated domain name type conforming to RFC 1123, so e.g. not an IP address
7777
type: string
78+
gitSync:
79+
properties:
80+
branch:
81+
default: main
82+
description: |-
83+
The branch to clone; defaults to `main`.
84+
85+
Since git-sync v4.x.x this field is mapped to the flag `--ref`.
86+
type: string
87+
credentialsSecret:
88+
description: |-
89+
The name of the Secret used to access the repository if it is not public.
90+
91+
The referenced Secret must include two fields: `user` and `password`.
92+
The `password` field can either be an actual password (not recommended) or a GitHub token,
93+
as described in the git-sync [documentation].
94+
This cannot be provided if `ssh_secret` is also provided.
95+
96+
[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
97+
nullable: true
98+
type: string
99+
depth:
100+
default: 1
101+
description: The depth of syncing, i.e. the number of commits to clone; defaults to 1.
102+
format: uint32
103+
minimum: 0.0
104+
type: integer
105+
gitFolder:
106+
default: /
107+
description: |-
108+
Location in the Git repository containing the resource; defaults to the root folder.
109+
110+
It can optionally start with `/`, however, no trailing slash is recommended.
111+
An empty string (``) or slash (`/`) corresponds to the root folder in Git.
112+
type: string
113+
gitSyncConf:
114+
additionalProperties:
115+
type: string
116+
default: {}
117+
description: |-
118+
A map of optional configuration settings that are listed in the git-sync [documentation].
119+
120+
Also read the git-sync [example] in our documentation. These settings are not verified.
121+
122+
[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
123+
[example]: https://docs.stackable.tech/home/nightly/airflow/usage-guide/mounting-dags#_example
124+
type: object
125+
repo:
126+
description: 'The git repository URL that will be cloned, for example: `https://github.com/stackabletech/airflow-operator` or `ssh://git@github.com:stackable-airflow/dags.git`.'
127+
format: uri
128+
type: string
129+
sshSecret:
130+
description: |-
131+
The name of the Secret used for SSH access to the repository.
132+
133+
The referenced Secret must include two fields: `key` and `knownHosts`.
134+
This cannot be provided if `credentials_secret` is also provided.
135+
136+
[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
137+
nullable: true
138+
type: string
139+
wait:
140+
default: 20s
141+
description: |-
142+
The synchronization interval, e.g. `20s` or `5m`; defaults to `20s`.
143+
144+
Since git-sync v4.x.x this field is mapped to the flag `--period`.
145+
type: string
146+
required:
147+
- repo
148+
type: object
78149
hostName:
79150
type: string
80151
kerberosRealmName:
@@ -1402,6 +1473,7 @@ spec:
14021473
- clientAuthenticationDetails
14031474
- clusterOperation
14041475
- domainName
1476+
- gitSync
14051477
- hostName
14061478
- kerberosRealmName
14071479
- opaConfig

crates/xtask/src/crd/dummy.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use serde::{Deserialize, Serialize};
22
use stackable_operator::{
33
commons::resources::{JvmHeapLimits, Resources},
44
config::fragment::Fragment,
5+
crd::git_sync::v1alpha1::GitSync,
56
deep_merger::ObjectOverrides,
67
kube::CustomResource,
78
role_utils::Role,
@@ -48,6 +49,7 @@ pub mod versioned {
4849
secret_class_volume: stackable_operator::commons::secret_class::SecretClassVolume,
4950
secret_reference: stackable_operator::shared::secret::SecretReference,
5051
tls_client_details: stackable_operator::commons::tls_verification::TlsClientDetails,
52+
git_sync: GitSync,
5153

5254
#[serde(default)]
5355
pub object_overrides: ObjectOverrides,

0 commit comments

Comments
 (0)