Docs/targetsource userguide push#91
Conversation
…or into docs/targetsource-userguide
Deploying gnmic-operator with
|
| Latest commit: |
a9ad35f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://cdd21b28.gnmic-operator2.pages.dev |
| Branch Preview URL: | https://docs-targetsource-userguide-9cut.gnmic-operator2.pages.dev |
|
Hey @denyost, I have added the push-interface documentation. It is split up the following way:
Please rename and adjust thing if you think it is needed. I've review your chapters too, I think they are good and I've changed some smaller things here and there. I am unsure if it is worth to have TargetSourceProvider as a separate site with only http as an option. Feels like we can get rid of that site, until more TargetSource are implemented 🤔 . Cheers, Roman |
|
|
||
| > Namespace is `default`, the name of the TargetSource is `netbox`. These values will be in the URL in step 3. | ||
|
|
||
| ### 2. Create Kubernetes Secrets |
There was a problem hiding this comment.
@Janooski I would create the Kubernetes Secrets and the TargetProfile first and then apply the TargetSource
| - Use `name` and `key` values that match the TargetSource spec. | ||
|
|
||
| ```bash | ||
| kubectl create secret generic gnmic-api-auth --from-literal=bearer-token=thisIsASecureToken -n default |
There was a problem hiding this comment.
@Janooski probably replace thisIsASecureToken with <thisIsASecureToken> to make it more clear that this has to be changed (same for SecretSignature)
| In NetBox, go to `Operations > Webhooks` and create a webhook with the following settings: | ||
|
|
||
| - *Name*: GNMIc operator push | ||
| - *URL*: `http://gnmic-controller-manager-api.gnmic-system.svc.cluster.local:8082/api/v1/default/target-source/netbox/applyTargets` |
There was a problem hiding this comment.
@Janooski maybe also mention how the URL gets constructed and mention possibility of exposing the service via proxy, I think at least you have to mention that this URL you show only works if netbox is inside the cluster else the name won't be resolvable
| - *HTTP method*: POST | ||
| - *HTTP content type*: application/json | ||
| - *SSL Verification*: true | ||
| - *Additional headers:* `Authorization: Bearer thisIsASecureToken` |
There was a problem hiding this comment.
@Janooski
thisIsASecureToken -> <thisIsASecureToken>
| "operation": "{{ event }}", | ||
| "targetProfile": "{{ data.custom_fields.target_profile | default('', true) }}", | ||
| "port": {{ data.custom_fields.gnmic_port | default(57400, true) }}, | ||
| "labels": [ |
There was a problem hiding this comment.
@Janooski adjust to the new way of key-value definition
| Enables REST API interface that accepts real-time target updates. | ||
| --- | ||
|
|
||
| ## Basic configuration |
There was a problem hiding this comment.
@Janooski
create a link from https://cdd21b28.gnmic-operator2.pages.dev/docs/user-guide/targetsource/providers/http/#push-mode to here
| name: targetsource-1 | ||
| spec: | ||
| provider: | ||
| http: |
There was a problem hiding this comment.
mention in a comment that the provider may be different
| - Must be in the same namespace the gNMIc controller runs in. | ||
| - `name`: refers to the secret name | ||
| - `key`: key of the secret | ||
| - Example: `kubectl create secret generic gnmic-api-auth --from-literal=bearer-token=Secret...` |
| HTTP request must contain the Bearer token in the header in the format: | ||
|
|
||
| ```yaml | ||
| Authorization: Bearer Secret... |
| | `signature` | object | No | - | HTTP body verification using HMAC | | ||
| | `algorithm` | string | No | sha512 | Algorithm for signature verification(`sha256`or`sha512`) | | ||
|
|
||
| ## Address |
There was a problem hiding this comment.
mention how you can find out this address (kubectl command to get the service)
| | **address** | **String** | IPv4/IPv6 address or hostname. | [default to null] | | ||
| | **port** | **Integer** | gNMIc port. | [optional] [default to null] | | ||
| | **targetProfile** | **String** | TargetProfile applied to apply to this router. | [optional] [default to null] | | ||
| | **labels** | [**List**](map.md) | Input of labels as key:value pair. | [optional] [default to null] | |
There was a problem hiding this comment.
404 not found -> labels should be a map of string string -> map[string]string
description is not that helpful
Add documentation for push-interface