Skip to content

Commit da01241

Browse files
committed
fixing documentation and typos
1 parent d756d80 commit da01241

3 files changed

Lines changed: 30 additions & 11 deletions

File tree

control-operator/README.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,76 @@
11
# operator
2-
// TODO(user): Add simple overview of use/purpose
2+
3+
Folder with operators regarding Task and Environment deployment.
34

45
## Description
5-
// TODO(user): An in-depth paragraph about your project and overview of use
6+
7+
In order to deploy Task and Environment workflows to the k8s cluster you need controllers and operators
8+
controlling custom CRDs defining ALICE custom workload. This Folder defines and implements all moving parts together with Makefile
9+
to build, deploy, install CRDs and operators.
610

711
## Getting Started
8-
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
9-
**Note:** Your controller will automatically use the current context in your kubeconfig file (i.e. whatever cluster `kubectl cluster-info` shows).
12+
13+
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster. Author had the most success with K3s [see](/docs/kubernetes_ecs.md).
14+
**Note:** Your controller will automatically use the current context in your kubeconfig (usually ~/.kube/config) file (i.e. whatever cluster `kubectl cluster-info` shows).
1015

1116
### Running on the cluster
17+
18+
Following commands show basic use of Makefile. However this isn't exhaustive list.
19+
1220
1. Install Instances of Custom Resources:
1321

1422
```sh
1523
kubectl apply -f config/samples/
1624
```
1725

18-
2. Build and push your image to the location specified by `IMG`:
26+
1. Build and push your image to the location specified by `IMG`:
1927

2028
```sh
2129
make docker-build docker-push IMG=<some-registry>/operator:tag
2230
```
2331

24-
3. Deploy the controller to the cluster with the image specified by `IMG`:
32+
1. Deploy the controller to the cluster with the image specified by `IMG`:
2533

2634
```sh
2735
make deploy IMG=<some-registry>/operator:tag
2836
```
2937

3038
### Uninstall CRDs
39+
3140
To delete the CRDs from the cluster:
3241

3342
```sh
3443
make uninstall
3544
```
3645

3746
### Undeploy controller
47+
3848
UnDeploy the controller from the cluster:
3949

4050
```sh
4151
make undeploy
4252
```
4353

4454
## Contributing
55+
4556
// TODO(user): Add detailed information on how you would like others to contribute to this project
4657

4758
### How it works
59+
4860
This project aims to follow the Kubernetes [Operator pattern](https://kubernetes.io/docs/concepts/extend-kubernetes/operator/).
4961

5062
It uses [Controllers](https://kubernetes.io/docs/concepts/architecture/controller/),
5163
which provide a reconcile function responsible for synchronizing resources until the desired state is reached on the cluster.
5264

5365
### Test It Out
66+
5467
1. Install the CRDs into the cluster:
5568

5669
```sh
5770
make install
5871
```
5972

60-
2. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
73+
1. Run your controller (this will run in the foreground, so switch to a new terminal if you want to leave it running):
6174

6275
```sh
6376
make run
@@ -66,6 +79,7 @@ make run
6679
**NOTE:** You can also run this in one step by running: `make install run`
6780

6881
### Modifying the API definitions
82+
6983
If you are editing the API definitions, generate the manifests such as CRs or CRDs using:
7084

7185
```sh
@@ -91,4 +105,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
91105
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
92106
See the License for the specific language governing permissions and
93107
limitations under the License.
94-

docs/kubernetes_ecs.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ is ability to run Pods with privileged permissions and also under user `flp`.
2323
This means that the machine has to have `flp` user setup the same way as
2424
if you would do the installation with [`o2-flp-setup`](https://alice-flp.docs.cern.ch/Operations/Experts/system-configuration/utils/o2-flp-setup/).
2525

26+
## Task Controller
27+
28+
Following text assumes that there is a Task Controller from `control-operator` running
29+
at your K8s cluster and Task CRD installed at your cluster.
30+
You can find the details about the usage in the [documentation](/control-operator/README.md).
31+
2632
## Running tasks (`KubectlTask`)
2733

2834
ECS is setup to run tasks through Mesos on all required hosts baremetal with active
@@ -62,7 +68,7 @@ inside the `ControlWorkflows` directory. Namely:
6268

6369
* add path to the kubectl manifest as the first argument in `.command.arguments` field
6470
* change `.control.mode` to either `kubectl_direct` or `kubectl_fairmq`
65-
You can find working template inside `control-operator/ecs-manifests/control-workflows/*_kube.yaml`
71+
You can find working template inside `control-operator/ecs-manifests/control-workflows/*-kube.yaml`
6672

6773
Working kubectl manifests are to be found in `control-operator/ecs-manifests/kubernetes-manifests`.
6874
You can see `*test.yaml` for concrete deployable manifests by `kubectl apply`, the rest

executor/executable/kubectltask.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (task *KubectlTask) Launch() error {
179179
}
180180
supplementalString := "[" + strings.Join(strIds, ", ") + "]"
181181

182-
os.Setenv("FLP_SUPPLEMENTAL_GORUPS", supplementalString)
182+
os.Setenv("FLP_SUPPLEMENTAL_GROUPS", supplementalString)
183183
} else {
184184
log.Error("we cannot run kubectl task as flp user because we didn't find user details")
185185
}
@@ -212,7 +212,7 @@ func (task *KubectlTask) Launch() error {
212212
log.WithFields(logrus.Fields{
213213
"controlmode": task.Tci.ControlMode,
214214
"name": task.ti.Name,
215-
}).WithError(err).Errorf("kubectl apply failed stderr: %s , stdin: %s", stderrBuf.String(), stdoutBuf.String())
215+
}).WithError(err).Errorf("kubectl apply failed stderr: %s , stdout: %s", stderrBuf.String(), stdoutBuf.String())
216216
return err
217217
}
218218

0 commit comments

Comments
 (0)