Как добавить авторизацию в ресурс ClusterLogDestination? | How to add authorization to the ClusterLogDestination resource? |
Чтобы добавить параметры авторизации в ресурс ClusterLogDestination, необходимо: | To add authorization parameters to the ClusterLogDestination resource, you need to:
|
Пример: | For example: |
|
|
yaml apiVersion: deckhouse.io/v1alpha1 kind: ClusterLogDestination metadata: name: loki spec: type: Loki loki: endpoint: “http://loki.d8-monitoring:3100” | yaml apiVersion: deckhouse.io/v1alpha1 kind: ClusterLogDestination metadata: name: loki spec: type: Loki loki: endpoint: “http://loki.d8-monitoring:3100” |
|
|
bash kubectl -n d8-log-shipper get secret log-shipper-token -o jsonpath=’{.data.token}’ | base64 -d | bash kubectl -n d8-log-shipper get secret log-shipper-token -o jsonpath=’{.data.token}’ | base64 -d |
|
|
yaml
apiVersion: deckhouse.io/v1alpha1
kind: ClusterLogDestination
metadata:
name: loki
spec:
type: Loki
loki:
endpoint: “https://loki.d8-monitoring:3100”
auth:
strategy: “Bearer”
token: | yaml
apiVersion: deckhouse.io/v1alpha1
kind: ClusterLogDestination
metadata:
name: loki
spec:
type: Loki
loki:
endpoint: “https://loki.d8-monitoring:3100”
auth:
strategy: “Bearer”
token: |