-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz
logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/README.md logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/main.yaml logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/values.schema.json
- Loading branch information
1 parent
6fe8f85
commit 6cad8e1
Showing
5 changed files
with
245 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
49 changes: 49 additions & 0 deletions
49
...ing-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/giantswarm/logging-operator/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/giantswarm/logging-operator/tree/main) | ||
|
||
# logging-operator | ||
|
||
This operator is in charge of handling the setup and configuration of the logging stack at Giant Swarm. | ||
|
||
It reconciles `cluster.cluster.x-k8s.io` objects and makes sure each `Cluster` is provided with logging agents: | ||
- [`promtail`](https://github.com/giantswarm/promtail-app) instance | ||
- [`grafana-agent`](https://github.com/giantswarm/grafana-agent-app) instance | ||
and the necessary configuration to ship logs into [`loki`](https://github.com/giantswarm/loki-app). | ||
|
||
## Getting started | ||
|
||
Get the code and build it via: | ||
|
||
```bash | ||
git clone https://github.com/giantswarm/logging-operator.git | ||
cd logging-operator | ||
make | ||
``` | ||
|
||
See `make help` for help. | ||
|
||
## Architecture | ||
|
||
The operator is built around a central reconciler, that calls multiple sub-reconcilers sequentially. | ||
![image](images/logging-operator-architecture.png) | ||
|
||
* Logging-Credentials are created if they don't exist. Then, their data (credentials) is used to create the next resources. | ||
* grafana datasource configures Grafana to read data from Loki | ||
* loki-multi-tenant-auth secures all Loki communication (per-tenant read/write access) | ||
* logging-secret configures write access to Loki for Promtail | ||
* logging-config setups some Promtail settings (like which logs to collect) | ||
* logging-wiring ensures promtail-app reads configs from previous steps | ||
* grafana-agent config setups some grafana-agent settings like the `river` configuration to scrape Kubernetes Events | ||
* grafana-agent secret setups logging write credentials to access loki into the `river` configuration | ||
* Logging agents toggle enables/disables logging agents deployment on WCs | ||
|
||
## Gathering logs from WCs | ||
|
||
When the need to gather logs from the WCs appears, the logging-operator will deploy promtail on those so that one may see the logs from the MC's grafana. It deploys also grafana-agent to be able to scrape Kubernetes Events. | ||
In order to achieve that, one has to label the cluster(s) one wants to gather logs from thanks to the following command : | ||
``` | ||
kubectl label cluster -n <wc_namespace> <wc_name> giantswarm.io/logging=true | ||
``` | ||
|
||
## Credits | ||
|
||
This operator was built using [`kubebuilder`](https://book.kubebuilder.io/quick-start.html). |
11 changes: 11 additions & 0 deletions
11
logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/main.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
annotations: | ||
application.giantswarm.io/metadata: https://giantswarm.github.io/control-plane-test-catalog/logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/main.yaml | ||
application.giantswarm.io/readme: https://giantswarm.github.io/control-plane-test-catalog/logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/README.md | ||
application.giantswarm.io/team: atlas | ||
application.giantswarm.io/values-schema: https://giantswarm.github.io/control-plane-test-catalog/logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/values.schema.json | ||
config.giantswarm.io/version: 1.x.x | ||
chartApiVersion: v2 | ||
chartFile: logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz | ||
dateCreated: '2024-10-30T10:50:08.071694Z' | ||
digest: 2f70f1a40e1f9190a33617ee0fa20afc0852641eed7ba49459db71b555271893 | ||
home: https://github.com/giantswarm/logging-operator |
168 changes: 168 additions & 0 deletions
168
logging-operator-0.14.0-1e7712cff81ac459d22d25f529f1740875c4d9d7.tgz-meta/values.schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
{ | ||
"$schema": "http://json-schema.org/schema#", | ||
"type": "object", | ||
"properties": { | ||
"global": { | ||
"type": "object", | ||
"properties": { | ||
"podSecurityStandards": { | ||
"type": "object", | ||
"properties": { | ||
"enforced": { | ||
"type": "boolean" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"image": { | ||
"type": "object", | ||
"properties": { | ||
"name": { | ||
"type": "string" | ||
}, | ||
"tag": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"loggingOperator": { | ||
"type": "object", | ||
"properties": { | ||
"loggingEnabled": { | ||
"type": "boolean" | ||
}, | ||
"vintageMode": { | ||
"type": "boolean" | ||
} | ||
} | ||
}, | ||
"managementCluster": { | ||
"type": "object", | ||
"properties": { | ||
"insecureCA": { | ||
"type": "boolean" | ||
}, | ||
"name": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"networkPolicy": { | ||
"type": "object", | ||
"properties": { | ||
"flavor": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"profiling": { | ||
"type": "object", | ||
"properties": { | ||
"enabled": { | ||
"type": "boolean" | ||
}, | ||
"port": { | ||
"type": "integer" | ||
} | ||
} | ||
}, | ||
"registry": { | ||
"type": "object", | ||
"properties": { | ||
"domain": { | ||
"type": "string" | ||
}, | ||
"pullSecret": { | ||
"type": "object", | ||
"properties": { | ||
"dockerConfigJSON": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"resources": { | ||
"type": "object", | ||
"properties": { | ||
"limits": { | ||
"type": "object", | ||
"properties": { | ||
"cpu": { | ||
"type": "string" | ||
}, | ||
"memory": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"requests": { | ||
"type": "object", | ||
"properties": { | ||
"cpu": { | ||
"type": "string" | ||
}, | ||
"memory": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"securityContext": { | ||
"type": "object", | ||
"properties": { | ||
"container": { | ||
"type": "object", | ||
"properties": { | ||
"allowPrivilegeEscalation": { | ||
"type": "boolean" | ||
}, | ||
"capabilities": { | ||
"type": "object", | ||
"properties": { | ||
"drop": { | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"readOnlyRootFilesystem": { | ||
"type": "boolean" | ||
}, | ||
"seccompProfile": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"pod": { | ||
"type": "object", | ||
"properties": { | ||
"runAsNonRoot": { | ||
"type": "boolean" | ||
}, | ||
"runAsUser": { | ||
"type": "integer" | ||
}, | ||
"seccompProfile": { | ||
"type": "object", | ||
"properties": { | ||
"type": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |