Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4b892dd
add ssh key information
adwk67 Nov 27, 2025
a18aeb4
remove ssh_known_hosts flag and git_ssh_volume_mounts
adwk67 Dec 1, 2025
ff025d4
Merge branch 'main' into feat/gitsync-ssh
adwk67 Dec 1, 2025
bed929e
pre-commit fix
adwk67 Dec 1, 2025
843820c
added check for multiple credential types
adwk67 Dec 1, 2025
3ab7a5f
changelog
adwk67 Dec 1, 2025
3bcde90
add gitsync to dummy cluster
adwk67 Dec 4, 2025
0e024d4
replace fields with enum
adwk67 Dec 8, 2025
f31b965
flatten enum and re-name fields
adwk67 Dec 18, 2025
c537512
fix conflict
adwk67 Dec 18, 2025
6c26212
Update crates/stackable-operator/src/crd/git_sync/v1alpha1_impl.rs
adwk67 Dec 18, 2025
41ba13c
Update crates/stackable-operator/src/crd/git_sync/v1alpha1_impl.rs
adwk67 Dec 18, 2025
d14cc6a
make enum untagged
adwk67 Dec 18, 2025
fbcb301
make enum untagged: corrected
adwk67 Dec 18, 2025
ec980f4
changelog: mark change as breaking
adwk67 Dec 18, 2025
8b94f6a
wip: versioning
adwk67 Dec 18, 2025
92d6dc4
added comment
adwk67 Dec 23, 2025
dbe2250
Merge branch 'main' into feat/gitsync-ssh
adwk67 Dec 23, 2025
1ebb612
fix/webhook): Don't crash on dropped initial_reconcile_tx channel
sbernauer Jan 7, 2026
dea589a
fix/webhook): Don't crash on dropped initial_reconcile_tx channel
sbernauer Jan 7, 2026
ff80cd5
changelog
sbernauer Jan 7, 2026
bfdffa8
changelog
sbernauer Jan 7, 2026
af06b5a
merge conflict
adwk67 Jan 7, 2026
69cac16
Merge branch 'main' into feat/gitsync-ssh
adwk67 Jan 7, 2026
8368484
Merge branch 'main' into feat/gitsync-ssh
adwk67 Jan 7, 2026
522bfc5
Merge branch 'main' into feat/gitsync-ssh
adwk67 Jan 7, 2026
08cb207
Merge branch 'main' into feat/gitsync-ssh
adwk67 Jan 12, 2026
8e306ef
Merge branch 'main' into feat/gitsync-ssh
adwk67 Jan 12, 2026
2015fb6
Merge branch 'main' into feat/gitsync-ssh
adwk67 Jan 14, 2026
91c98d3
corrected changelog
adwk67 Jan 14, 2026
354c9e6
move default functions to non-versioned functions
adwk67 Jan 15, 2026
2fec9f1
Merge branch 'main' into feat/gitsync-ssh
adwk67 Jan 15, 2026
d635dd0
corrected order in changelog
adwk67 Jan 15, 2026
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
2 changes: 2 additions & 0 deletions crates/stackable-operator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.

- BREAKING: `ClusterResources` now requires the objects added to implement `DeepMerge`.
This is very likely a stackable-operator internal change, but technically breaking ([#1118]).
- Add support for the SSH protocol for pulling git content ([#1121]).
Comment thread
adwk67 marked this conversation as resolved.
Outdated
- Depend on the patched version of kube-rs available at <https://github.com/stackabletech/kube-rs>,
ensuring the operators automatically benefit from the fixes ([#1124]).

Expand All @@ -21,6 +22,7 @@ All notable changes to this project will be documented in this file.
- BREAKING: `ClusterResources` no longer derives `Eq` ([#1118]).

[#1118]: https://github.com/stackabletech/operator-rs/pull/1118
[#1121]: https://github.com/stackabletech/operator-rs/pull/1121
[#1124]: https://github.com/stackabletech/operator-rs/pull/1124

## [0.100.3] - 2025-10-31
Expand Down
78 changes: 78 additions & 0 deletions crates/stackable-operator/crds/DummyCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,83 @@ spec:
domainName:
description: A validated domain name type conforming to RFC 1123, so e.g. not an IP address
type: string
gitSync:
properties:
branch:
default: main
description: |-
The branch to clone; defaults to `main`.

Since git-sync v4.x.x this field is mapped to the flag `--ref`.
type: string
credentials:
anyOf:
- required:
- basicAuthSecretName
- required:
- sshPrivateKeySecretName
description: An optional secret used for git access.
nullable: true
properties:
basicAuthSecretName:
description: |-
The name of the Secret used to access the repository via Basic Authentication if it is not public.

The referenced Secret must include two fields: `user` and `password`.
The `password` field can either be an actual password (not recommended) or a GitHub token,
as described in the git-sync [documentation].

[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
type: string
sshPrivateKeySecretName:
description: |-
The name of the Secret used for SSH access to the repository.

The referenced Secret must include two fields: `key` and `knownHosts`.

[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
type: string
type: object
depth:
default: 1
description: The depth of syncing, i.e. the number of commits to clone; defaults to 1.
format: uint32
minimum: 0.0
type: integer
gitFolder:
default: /
description: |-
Location in the Git repository containing the resource; defaults to the root folder.

It can optionally start with `/`, however, no trailing slash is recommended.
An empty string (``) or slash (`/`) corresponds to the root folder in Git.
type: string
gitSyncConf:
additionalProperties:
type: string
default: {}
description: |-
A map of optional configuration settings that are listed in the git-sync [documentation].

Also read the git-sync [example] in our documentation. These settings are not verified.

[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
[example]: https://docs.stackable.tech/home/nightly/airflow/usage-guide/mounting-dags#_example
type: object
repo:
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`.'
format: uri
type: string
wait:
default: 20s
description: |-
The synchronization interval, e.g. `20s` or `5m`; defaults to `20s`.

Since git-sync v4.x.x this field is mapped to the flag `--period`.
type: string
required:
- repo
type: object
hostName:
type: string
kerberosRealmName:
Expand Down Expand Up @@ -1402,6 +1479,7 @@ spec:
- clientAuthenticationDetails
- clusterOperation
- domainName
- gitSync
- hostName
- kerberosRealmName
- opaConfig
Expand Down
43 changes: 33 additions & 10 deletions crates/stackable-operator/src/crd/git_sync/mod.rs
Comment thread
sbernauer marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub mod versioned {
#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct GitSync {
/// The git repository URL that will be cloned, for example: `https://github.com/stackabletech/airflow-operator`.
/// 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`.
pub repo: Url,

/// The branch to clone; defaults to `main`.
Expand All @@ -46,15 +46,6 @@ pub mod versioned {
#[serde(default = "GitSync::default_wait")]
pub wait: Duration,

/// The name of the Secret used to access the repository if it is not public.
///
/// The referenced Secret must include two fields: `user` and `password`.
/// The `password` field can either be an actual password (not recommended) or a GitHub token,
/// as described in the git-sync [documentation].
///
/// [documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
pub credentials_secret: Option<String>,

/// A map of optional configuration settings that are listed in the git-sync [documentation].
///
/// Also read the git-sync [example] in our documentation. These settings are not verified.
Expand All @@ -63,5 +54,37 @@ pub mod versioned {
/// [example]: DOCS_BASE_URL_PLACEHOLDER/airflow/usage-guide/mounting-dags#_example
#[serde(default)]
pub git_sync_conf: BTreeMap<String, String>,

/// An optional secret used for git access.
pub credentials: Option<Credentials>,
}

#[derive(strum::Display, Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)]
#[serde(untagged)]
Comment thread
adwk67 marked this conversation as resolved.
Outdated
#[serde(rename_all = "camelCase")]
#[schemars(rename_all = "camelCase")]
pub enum Credentials {
BasicAuth {
/// The name of the Secret used to access the repository via Basic Authentication if it is not public.
///
/// The referenced Secret must include two fields: `user` and `password`.
/// The `password` field can either be an actual password (not recommended) or a GitHub token,
/// as described in the git-sync [documentation].
///
/// [documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
#[serde(rename = "basicAuthSecretName")]
#[schemars(rename = "basicAuthSecretName")]
basic_auth_secret_name: String,
},
Ssh {
/// The name of the Secret used for SSH access to the repository.
///
/// The referenced Secret must include two fields: `key` and `knownHosts`.
///
/// [documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
#[serde(rename = "sshPrivateKeySecretName")]
#[schemars(rename = "sshPrivateKeySecretName")]
ssh_private_key_secret_name: String,
},
}
}
Loading