Skip to content

Commit 772eba1

Browse files
committed
wip:ssh for gitsync
1 parent dbc947b commit 772eba1

File tree

15 files changed

+180
-73
lines changed

15 files changed

+180
-73
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ default_language_version:
66

77
repos:
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # 6.0.0
9+
rev: v6.0.0 # 6.0.0
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
@@ -16,26 +16,26 @@ repos:
1616

1717
- repo: https://github.com/EmbarkStudios/cargo-deny
1818
# Failing to compile cargo-deny with version >0.18.3, needs rust 1.88.0
19-
rev: baa02b0a0c54e0578aae6bb7c7181ad00dc290af # 0.18.3
19+
rev: 0.18.6 # 0.18.3
2020
hooks:
2121
- id: cargo-deny
2222
args: ["--all-features", "check", "advisories", "bans", "licenses", "sources"]
2323

2424
- repo: https://github.com/adrienverge/yamllint
25-
rev: 79a6b2b1392eaf49cdd32ac4f14be1a809bbd8f7 # 1.37.1
25+
rev: v1.37.1 # 1.37.1
2626
hooks:
2727
- id: yamllint
2828
args: ["--strict"]
2929

3030
- repo: https://github.com/igorshubovych/markdownlint-cli
31-
rev: 192ad822316c3a22fb3d3cc8aa6eafa0b8488360 # 0.45.0
31+
rev: v0.46.0 # 0.45.0
3232
hooks:
3333
- id: markdownlint
3434
types: [text]
3535
files: \.md(\.j2)*$
3636

3737
- repo: https://github.com/koalaman/shellcheck-precommit
38-
rev: 99470f5e12208ff0fb17ab81c3c494f7620a1d8d # 0.11.0
38+
rev: v0.11.0 # 0.11.0
3939
hooks:
4040
- id: shellcheck
4141
args: ["--severity=info"]
@@ -44,20 +44,20 @@ repos:
4444
# If you do not, you will need to delete the cached ruff binary shown in the
4545
# error message
4646
- repo: https://github.com/astral-sh/ruff-pre-commit
47-
rev: 3b4bc031619cde2e0a9f3c4441ac7cc8227245a4 # 0.14.1
47+
rev: v0.14.7 # 0.14.1
4848
hooks:
4949
# Run the linter.
5050
- id: ruff-check
5151
# Run the formatter.
5252
- id: ruff-format
5353

5454
- repo: https://github.com/rhysd/actionlint
55-
rev: e7d448ef7507c20fc4c88a95d0c448b848cd6127 # 1.7.8
55+
rev: v1.7.9 # 1.7.8
5656
hooks:
5757
- id: actionlint
5858

5959
- repo: https://github.com/hadolint/hadolint
60-
rev: 57e1618d78fd469a92c1e584e8c9313024656623 # 2.14.0
60+
rev: v2.14.0 # 2.14.0
6161
hooks:
6262
- id: hadolint
6363

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.nix

Lines changed: 22 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/airflow-operator"
1111

1212
[workspace.dependencies]
1313
product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" }
14-
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.100.1" }
14+
stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["telemetry", "versioned"], tag = "stackable-operator-0.100.3" }
1515

1616
anyhow = "1.0"
1717
base64 = "0.22"
@@ -32,6 +32,6 @@ strum = { version = "0.27", features = ["derive"] }
3232
tokio = { version = "1.40", features = ["full"] }
3333
tracing = "0.1"
3434

35-
# [patch."https://github.com/stackabletech/operator-rs.git"]
36-
# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" }
37-
# stackable-operator = { path = "../operator-rs/crates/stackable-operator" }
35+
[patch."https://github.com/stackabletech/operator-rs.git"]
36+
stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feat/gitsync-ssh" }
37+
#stackable-operator = { path = "../operator-rs/crates/stackable-operator" }

crate-hashes.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/helm/airflow-operator/crds/crds.yaml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ spec:
680680
The referenced Secret must include two fields: `user` and `password`.
681681
The `password` field can either be an actual password (not recommended) or a GitHub token,
682682
as described in the git-sync [documentation].
683+
This cannot be provided if `ssh_secret` is also provided.
683684
684685
[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
685686
nullable: true
@@ -711,9 +712,19 @@ spec:
711712
[example]: https://docs.stackable.tech/home/nightly/airflow/usage-guide/mounting-dags#_example
712713
type: object
713714
repo:
714-
description: 'The git repository URL that will be cloned, for example: `https://github.com/stackabletech/airflow-operator`.'
715+
description: 'The git repository URL that will be cloned, for example: `https://github.com/stackabletech/airflow-operator` or `ssh://[email protected]:stackable-airflow/dags.git`.'
715716
format: uri
716717
type: string
718+
sshSecret:
719+
description: |-
720+
The name of the Secret used for SSH access to the repository.
721+
722+
The referenced Secret must include two fields: `key` and `knownHosts`.
723+
This cannot be provided if `credentials_secret` is also provided.
724+
725+
[documentation]: https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual
726+
nullable: true
727+
type: string
717728
wait:
718729
default: 20s
719730
description: |-
@@ -1602,6 +1613,20 @@ spec:
16021613
type: object
16031614
x-kubernetes-preserve-unknown-fields: true
16041615
type: object
1616+
objectOverrides:
1617+
default: []
1618+
description: |-
1619+
A list of generic Kubernetes objects, which are merged into the objects that the operator
1620+
creates.
1621+
1622+
List entries are arbitrary YAML objects, which need to be valid Kubernetes objects.
1623+
1624+
Read the [Object overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#object-overrides)
1625+
for more information.
1626+
items:
1627+
type: object
1628+
x-kubernetes-preserve-unknown-fields: true
1629+
type: array
16051630
schedulers:
16061631
description: |-
16071632
The `schedulers` is responsible for triggering jobs and persisting their metadata to the backend database.

docs/modules/airflow/examples/example-airflow-gitsync.yaml renamed to docs/modules/airflow/examples/example-airflow-gitsync-https.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,12 @@ spec:
2424
--git-config: http.sslCAInfo:/tmp/ca-cert/ca.crt # <11>
2525
webservers:
2626
...
27+
---
28+
apiVersion: v1
29+
kind: Secret
30+
metadata:
31+
name: git-credentials # <8>
32+
type: Opaque
33+
data:
34+
user: c3Rh...
35+
password: Z2l0a...
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
apiVersion: airflow.stackable.tech/v1alpha1
3+
kind: AirflowCluster
4+
metadata:
5+
name: airflow
6+
spec:
7+
...
8+
dagsGitSync:
9+
- repo: ssh://[email protected]/stackable-airflow/dags.git # <1>
10+
sshSecret: git-sync-ssh # <2>
11+
---
12+
apiVersion: v1
13+
kind: Secret
14+
metadata:
15+
name: git-sync-ssh # <2>
16+
type: Opaque
17+
data:
18+
key: LS0tL...
19+
knownHosts: Z2l0a...

0 commit comments

Comments
 (0)