You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-29
Original file line number
Diff line number
Diff line change
@@ -18,26 +18,26 @@ Simply clone your scripts repository in your pod workspace, execute script and e
18
18
19
19
### Git clone inside CI job
20
20
21
-
`git-clone-operator checkout` is a CLI command that could be a replacement of `git clone` and `git checkout`.
21
+
`git-clone-controller checkout` is a CLI command that could be a replacement of `git clone` and `git checkout`.
22
22
Its advantage is that it is designed to be running automatic: When repository does not exist, it gets cloned, when exists, then updated with remote.
23
23
24
24
25
25
Setting up
26
26
----------
27
27
28
-
Use helm to install git-clone-operator. For helm values please take a look at [values reference](https://github.com/riotkit-org/git-clone-operator/blob/main/helm/git-clone-operator/values.yaml).
28
+
Use helm to install git-clone-controller. For helm values please take a look at [values reference](https://github.com/riotkit-org/git-clone-controller/blob/main/helm/git-clone-controller/values.yaml).
# required: target path, where the repository should be cloned, should be placed on a shared Volume mount point with other containers in same Pod
56
-
git-clone-operator/path: /workspace/source
56
+
git-clone-controller/path: /workspace/source
57
57
# optional: user id (will result in adding `securityContext`), in effect: running `git` as selected user and creating files as selected user
58
-
git-clone-operator/owner: "1000"
59
-
# optional: group id (will result in adding `securityContext`), same behavior as in "git-clone-operator/owner"
60
-
git-clone-operator/group: "1000"
58
+
git-clone-controller/owner: "1000"
59
+
# optional: group id (will result in adding `securityContext`), same behavior as in "git-clone-controller/owner"
60
+
git-clone-controller/group: "1000"
61
61
# optional: `kind: Secret` name from same namespace as Pod is (if not specified, then global defaults from operator will be taken, or no authorization would be used)
62
-
git-clone-operator/secretName: git-secrets
62
+
git-clone-controller/secretName: git-secrets
63
63
# optional: entry name in `.data` section of selected `kind: Secret`
64
-
git-clone-operator/secretTokenKey: jenkins-x
64
+
git-clone-controller/secretTokenKey: jenkins-x
65
65
66
66
# optional: entry name in `.data` section, describes the GIT username, defaults to __token__ if not specified
67
-
#git-clone-operator/secretUsernameKey: username
67
+
#git-clone-controller/secretUsernameKey: username
68
68
spec:
69
69
restartPolicy: Never
70
70
automountServiceAccountToken: false
@@ -83,7 +83,7 @@ spec:
83
83
emptyDir: {}
84
84
85
85
# PERMISSIONS:
86
-
# If `git-clone-operator/owner` and `git-clone-operator/group` specified, then `fsGroup` should have same value there
86
+
# If `git-clone-controller/owner` and `git-clone-controller/group` specified, then `fsGroup` should have same value there
87
87
# so the mounted volume would have proper permissions
| Pods NOT marked with `riotkit.org/git-clone-controller: "true"`| Do Nothing |
110
+
| Pods MARKED with `riotkit.org/git-clone-controller: "true"`| Process |
111
+
| Missing required annotation | Do not schedule that `Pod`|
112
+
|`kind: Secret` was specified, but is invalid | Do not schedule that `Pod`|
113
+
| Unknown error while processing labelled `Pod`| Do not schedule that `Pod`|
114
+
| GIT credentials are invalid | Fail inside initContainer and don't let Pod's containers to execute |
115
+
| Revision is invalid | Fail inside initContainer and don't let Pod's containers to execute |
116
+
| Volume permissions are invalid | Fail inside initContainer and don't let Pod's containers to execute |
117
+
| Unknown error while trying to checkout/clone inside initContainer | Fail inside initContainer and don't let Pod's containers to execute |
118
118
119
119
Security and reliability
120
120
------------------------
@@ -123,7 +123,7 @@ Security and reliability
123
123
- Static golang binary, without dynamic libraries, no dependency on libc
124
124
- No dependency on `git` binary, thanks to [go-git](https://github.com/go-git/go-git)
125
125
- Namespaced `kind: Secret` are used close to `kind: Pod`
126
-
- Admission Webhooks are [limited in scope on API level](./helm/git-clone-operator/templates/mutatingwebhookconfiguration.yaml) - **only labelled Pods are touched**
126
+
- Admission Webhooks are [limited in scope on API level](./helm/git-clone-controller/templates/mutatingwebhookconfiguration.yaml) - **only labelled Pods are touched**
127
127
- Default Pod's securityContext runs as non-root, with high uid/gid, should work on OpenShift
128
128
- API is using internally mutual TLS to talk with Kubernetes
129
129
@@ -135,7 +135,7 @@ Roadmap
135
135
-[x] Injecting git-clone initContainers into labelled pods
136
136
-[x] Support for Git over HTTPS
137
137
-[x] Specifying user id (owner) of files in workspace
138
-
-[x] CLI command `git-clone-operator clone ...` and single Dockerfile for both initContainer and operator
138
+
-[x] CLI command `git-clone-controller clone ...` and single Dockerfile for both initContainer and operator
139
139
-[x] Helm
140
140
-[x] Add configurable security context - runAs and filesystem permissions
Copy file name to clipboardExpand all lines: helm/git-clone-controller/Chart.yaml
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
apiVersion: v2
2
-
name: git-clone-operator
2
+
name: git-clone-controller
3
3
description: "Simple Pod provisioner using GIT as source. Just label your Pods to get an additional initContainer that will clone your repo before Pod will start up."
Copy file name to clipboardExpand all lines: helm/git-clone-controller/README.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -18,22 +18,22 @@ Simply clone your scripts repository in your pod workspace, execute script and e
18
18
19
19
### Git clone inside CI job
20
20
21
-
`git-clone-operator checkout` is a CLI command that could be a replacement of `git clone` and `git checkout`.
21
+
`git-clone-controller checkout` is a CLI command that could be a replacement of `git clone` and `git checkout`.
22
22
It's advantage is that it is designed to be running automatic: When repository does not exists, it gets cloned, when exists, then updated with remote.
23
23
24
24
25
25
Setting up
26
26
----------
27
27
28
-
Use helm to install git-clone-operator. For helm values please take a look at [values reference](https://github.com/riotkit-org/git-clone-operator/blob/main/helm/git-clone-operator/values.yaml).
28
+
Use helm to install git-clone-controller. For helm values please take a look at [values reference](https://github.com/riotkit-org/git-clone-controller/blob/main/helm/git-clone-controller/values.yaml).
0 commit comments