In a previous step, you configured a `config.yaml` to point to the GitLab projects
In a previous step, you configured a `config.yaml` to point to the GitLab projects
the Agent should synchronize. In each of those projects, you must create a `manifest.yaml`
the Agent should synchronize. Agent monitors each of those projects for changes to the manifest files it contains. You can auto-generate manifest files with a
file for the Agent to monitor. You can auto-generate this `manifest.yaml` with a
templating engine or other means.
templating engine or other means.
The agent is authorized to download manifests for the configuration
The agent is authorized to download manifests for the configuration
...
@@ -400,13 +398,13 @@ project, and public projects. Support for other private projects is
...
@@ -400,13 +398,13 @@ project, and public projects. Support for other private projects is
planned in the issue [Agent authorization for private manifest
planned in the issue [Agent authorization for private manifest
Each time you commit and push a change to this file, the Agent logs the change:
Each time you push a change to a monitored manifest repository, the Agent logs the change:
```plaintext
```plaintext
2020-09-15_14:09:04.87946 gitlab-k8s-agent : time="2020-09-15T10:09:04-04:00" level=info msg="Config: new commit" agent_id=1 commit_id=e6a3651f1faa2e928fe6120e254c122451be4eea
2020-09-15_14:09:04.87946 gitlab-k8s-agent : time="2020-09-15T10:09:04-04:00" level=info msg="Config: new commit" agent_id=1 commit_id=e6a3651f1faa2e928fe6120e254c122451be4eea
```
```
#### Example `manifest.yaml` file
#### Example manifest file
This file creates an NGINX deployment.
This file creates an NGINX deployment.
...
@@ -503,9 +501,9 @@ specified the `kas-address` correctly.
...
@@ -503,9 +501,9 @@ specified the `kas-address` correctly.
{"level":"info","time":"2020-10-30T08:56:54.329Z","msg":"Synced","project_id":"root/kas-manifest001","resource_key":"apps/Deployment/kas-test001/nginx-deployment","sync_result":"error validating data: [ValidationError(Deployment.metadata): unknown field \"replicas\" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta, ValidationError(Deployment.metadata): unknown field \"selector\" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta, ValidationError(Deployment.metadata): unknown field \"template\" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta]"}
{"level":"info","time":"2020-10-30T08:56:54.329Z","msg":"Synced","project_id":"root/kas-manifest001","resource_key":"apps/Deployment/kas-test001/nginx-deployment","sync_result":"error validating data: [ValidationError(Deployment.metadata): unknown field \"replicas\" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta, ValidationError(Deployment.metadata): unknown field \"selector\" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta, ValidationError(Deployment.metadata): unknown field \"template\" in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta]"}
```
```
This error is shown if your `manifest.yaml` file is malformed, and Kubernetes can't
This error is shown if a manifest file is malformed, and Kubernetes can't
create specified objects. Make sure that your `manifest.yaml` file is valid. You
create specified objects. Make sure that your manifest files are valid. You
may try using it to create objects in Kubernetes directly for more troubleshooting.
may try using them to create objects in Kubernetes directly for more troubleshooting.
### Agent logs - Error while dialing failed to WebSocket dial: failed to send handshake request
### Agent logs - Error while dialing failed to WebSocket dial: failed to send handshake request