forked from kube-rs/controller-rs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dont write output if they havent changed. Distinct retry timer on err…
…or and success. Re-Read on api write if the target doesnt respond with data. json_query possible on read
- Loading branch information
Showing
10 changed files
with
766 additions
and
198 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "kuberest" | ||
version = "1.2.0" | ||
version = "1.3.0" | ||
authors = ["Sébastien Huss <[email protected]>"] | ||
edition = "2021" | ||
default-run = "controller" | ||
|
@@ -26,7 +26,7 @@ operator = { cmd=[ | |
]} | ||
precommit = { cmd=[ | ||
"cargo update", | ||
"cargo clippy --fix --allow-dirty", | ||
"cargo clippy --fix --allow-dirty --allow-staged", | ||
"cargo cmd generate", | ||
"cargo +nightly fmt" | ||
]} | ||
|
@@ -81,6 +81,7 @@ base64 = "0.22.1" | |
rand = "0.8.5" | ||
argon2 = { version = "0.5.3", features = ["std"] } | ||
bcrypt = "0.16.0" | ||
serde_json_path = "0.7.1" | ||
|
||
[dev-dependencies] | ||
assert-json-diff = "2.0.2" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
apiVersion: kuberest.solidite.fr/v1 | ||
kind: RestEndPoint | ||
metadata: | ||
name: gitea-org-images | ||
spec: | ||
inputs: | ||
- name: admin | ||
secretRef: | ||
name: gitea-admin-user | ||
client: | ||
baseurl: https://gitea.your-company.com/api/v1 | ||
headers: | ||
Authorization: '{{ header_basic (base64_decode input.admin.data.username) (base64_decode input.admin.data.password) }}' | ||
writes: | ||
- name: orgs | ||
path: orgs | ||
keyName: username | ||
items: | ||
- name: org | ||
values: | | ||
username: images | ||
visibility: public | ||
repo_admin_change_team_access: true | ||
- name: teams | ||
path: orgs/images/teams | ||
updatePath: teams | ||
items: | ||
- name: dev | ||
values: |- | ||
name: dev | ||
includes_all_repositories: true | ||
can_create_org_repo: false | ||
permission: read | ||
units: | ||
- repo.issues | ||
- repo.ext_issues | ||
- repo.releases | ||
- repo.ext_wiki | ||
- repo.projects | ||
- repo.actions | ||
- repo.code | ||
- repo.pulls | ||
- repo.wiki | ||
- repo.packages | ||
units_map: | ||
repo.actions: write | ||
repo.code: write | ||
repo.ext_issues: read | ||
repo.ext_wiki: read | ||
repo.issues: write | ||
repo.packages: write | ||
repo.projects: write | ||
repo.pulls: write | ||
repo.releases: read | ||
repo.wiki: write | ||
- name: qa | ||
values: |- | ||
name: qa | ||
includes_all_repositories: true | ||
can_create_org_repo: false | ||
permission: read | ||
units: | ||
- repo.issues | ||
- repo.ext_issues | ||
- repo.releases | ||
- repo.ext_wiki | ||
- repo.projects | ||
- repo.actions | ||
- repo.code | ||
- repo.pulls | ||
- repo.wiki | ||
- repo.packages | ||
units_map: | ||
repo.actions: read | ||
repo.code: read | ||
repo.ext_issues: read | ||
repo.ext_wiki: read | ||
repo.issues: write | ||
repo.packages: read | ||
repo.projects: write | ||
repo.pulls: read | ||
repo.releases: read | ||
repo.wiki: write | ||
- name: read | ||
values: |- | ||
name: read | ||
includes_all_repositories: true | ||
can_create_org_repo: false | ||
permission: read | ||
units: | ||
- repo.issues | ||
- repo.ext_issues | ||
- repo.releases | ||
- repo.ext_wiki | ||
- repo.projects | ||
- repo.actions | ||
- repo.code | ||
- repo.pulls | ||
- repo.wiki | ||
- repo.packages | ||
units_map: | ||
repo.actions: read | ||
repo.code: read | ||
repo.ext_issues: read | ||
repo.ext_wiki: read | ||
repo.issues: read | ||
repo.packages: read | ||
repo.projects: read | ||
repo.pulls: read | ||
repo.releases: read | ||
repo.wiki: read |
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,37 @@ | ||
apiVersion: kuberest.solidite.fr/v1 | ||
kind: RestEndPoint | ||
metadata: | ||
name: harbor-mirror-docker | ||
spec: | ||
inputs: | ||
- name: admin | ||
secretRef: | ||
name: harbor-basic | ||
client: | ||
baseurl: https://harbor.your-company.com/api/v2.0 | ||
headers: | ||
Authorization: '{{ header_basic "admin" (base64_decode input.admin.data.HARBOR_ADMIN_PASSWORD) }}' | ||
writes: | ||
- name: registries | ||
path: registries | ||
updateMethod: Put | ||
items: | ||
- name: mirror | ||
readPath: registries?name=docker | ||
readJsonQuery: $[0] | ||
values: | | ||
name: docker | ||
url: https://hub.docker.com | ||
type: docker-hub | ||
- name: projects | ||
path: projects | ||
updateMethod: Put | ||
keyName: project_id | ||
items: | ||
- name: mirror | ||
readPath: projects?name=docker | ||
readJsonQuery: $[0] | ||
values: |- | ||
project_name: docker | ||
public: true | ||
registry_id: {{ write.registries.mirror.id }} |
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
Oops, something went wrong.