-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs for v0.10.5 #91
Docs for v0.10.5 #91
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Metrics and Logs Documentation | ||
|
||
This document offers an overview of the Prometheus metrics implemented by the `multi_tenant_operator` controllers, along with an interpretation guide for the logs and statuses generated by these controllers. Each metric is designed to provide specific insights into the controllers' operational performance, while the log interpretation guide aids in understanding their behavior and workflow processes. Additionally, the status descriptions for custom resources provide operational snapshots. Together, these elements form a comprehensive toolkit for monitoring and enhancing the performance and health of the controllers. | ||
|
||
## Metrics List | ||
|
||
**`multi_tenant_operator_resources_deployed_total`** | ||
|
||
- **Description**: Tracks the total number of resources deployed by the operator. | ||
- **Type**: Gauge | ||
- **Labels**: `kind`, `name`, `namespace` | ||
- **Usage**: Helps to understand the overall workload managed by the operator. | ||
|
||
**`multi_tenant_operator_resources_deployed`** | ||
|
||
- **Description**: Monitors resources currently deployed by the operator. | ||
- **Type**: Gauge | ||
- **Labels**: `kind`, `name`, `namespace`, `type` | ||
- **Usage**: Useful for tracking the current state and type of resources managed by the operator. | ||
|
||
**`multi_tenant_operator_reconcile_error`** | ||
|
||
- **Description**: Indicates resources in an error state, broken down by resource kind, name, and namespace. | ||
- **Type**: Gauge | ||
- **Labels**: `kind`, `name`, `namespace`, `state`, `errors` | ||
- **Usage**: Essential for identifying and analyzing errors in resource management. | ||
|
||
**`multi_tenant_operator_reconcile_count`** | ||
|
||
- **Description**: Counts the number of reconciliations performed for a template group instance, categorized by name. | ||
- **Type**: Gauge | ||
- **Labels**: `kind`, `name` | ||
- **Usage**: Provides insight into the frequency of reconciliation processes. | ||
|
||
**`multi_tenant_operator_reconcile_seconds`** | ||
|
||
- **Description**: Represents the cumulative duration, in seconds, taken to reconcile a template group instance, categorized by instance name. | ||
- **Type**: Gauge | ||
- **Labels**: `kind`, `name` | ||
- **Usage**: Critical for assessing the time efficiency of the reconciliation process. | ||
|
||
**`multi_tenant_operator_reconcile_seconds_total`** | ||
|
||
- **Description**: Tracks the total duration, in seconds, for all reconciliation processes of a template group instance, categorized by instance name. | ||
- **Type**: Gauge | ||
- **Labels**: `kind`, `name` | ||
- **Usage**: Useful for understanding the overall time spent on reconciliation processes. | ||
|
||
## Custom Resource Status | ||
|
||
In this section, we delve into the status of various custom resources managed by our controllers. The `kubectl describe` command can be used to fetch the status of these resources. | ||
|
||
### Template Group Instance | ||
|
||
Status from the `templategroupinstances.tenantoperator.stakater.com` custom resource: | ||
|
||
- **Current Operational State**: Provides a snapshot of the resource's current condition. | ||
- **Conditions**: Offers a detailed view of the resource's status, which includes: | ||
- `InstallSucceeded`: Indicates the success of the instance's installation. | ||
- `Ready`: Shows the readiness of the instance, with details on the last reconciliation process, its duration, and relevant messages. | ||
- `Running`: Reports on active processes like ongoing resource reconciliation. | ||
- **Deployed Namespaces**: Enumerates the namespaces where the instance has been deployed, along with their statuses and associated template manifests. | ||
- **Manifest Hashes**: Includes the `Template Manifests Hash` and `Resource Mapping Hash`, which provide versioning and change tracking for template manifests and resource mappings. | ||
|
||
## Log Interpretation Guide | ||
|
||
### Template Group Instance Controller | ||
|
||
Logs from the `tenant-operator-templategroupinstance-controller`: | ||
|
||
- **Reconciliation Process**: Logs starting with `Reconciling!` mark the beginning of a reconciliation process for a TemplateGroupInstance. Subsequent actions like `Creating/Updating TemplateGroupInstance` and `Retrieving list of namespaces Matching to TGI` outline the reconciliation steps. | ||
- **Namespace and Resource Management**: Logs such as `Namespaces test-namespace-1 is new or failed...` and `Creating/Updating resource...` detail the management of Kubernetes resources in specific namespaces. | ||
- **Worker Activities**: Logs labeled `[Worker X]` show tasks being processed in parallel, including steps like `Validating parameters`, `Gathering objects from manifest`, and `Apply manifests`. | ||
- **Reconciliation Completion**: Entries like `End Reconciling` and `Defering XXth Reconciling, with duration XXXms` indicate the end of a reconciliation process and its duration, aiding in performance analysis. | ||
- **Watcher Events**: Logs from `Watcher` such as `Delete call received for object...` and `Following resource is recreated...` are key for tracking changes to Kubernetes objects. | ||
|
||
These logs are crucial for tracking the system's behavior, diagnosing issues, and comprehending the resource management workflow. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
# FAQs | ||
|
||
## Pod Creation Error | ||
|
||
### Q. Errors in ReplicaSet Events about pods not being able to schedule on Openshift because scc annotation is not found | ||
Check failure on line 5 in content/faq.md GitHub Actions / vale[vale] content/faq.md#L5
Raw output
|
||
|
||
```terminal | ||
unable to find annotation openshift.io/sa.scc.uid-range | ||
``` | ||
|
||
**Answer.** Openshift recently updated its process of handling SCC and it's now managed by annotations like `openshift.io/sa.scc.uid-range` on the namespaces. Absense of them wont let pods schedule. The fix for the above error is to make sure ServiceAccount `system:serviceaccount:openshift-infra.` regex is always mentioned in `PrivilegedServiceAccounts` section of `IntegrationConfig`. This regex will allow operations from all `ServiceAccounts` present in `openshift-infra` namespace. More info at [Privileged Service Accounts](./integration-config.md#privileged-serviceaccounts) | ||
Check failure on line 11 in content/faq.md GitHub Actions / vale[vale] content/faq.md#L11
Raw output
Check failure on line 11 in content/faq.md GitHub Actions / vale[vale] content/faq.md#L11
Raw output
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [LanguageTool] reported by reviewdog 🐶 |
||
|
||
## Namespace Admission Webhook | ||
|
||
### Q. Error received while performing Create, Update or Delete action on Namespace | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,8 +51,7 @@ As we can see, in our TGI, we have a field `spec.sync` which is set to `true`. T | |
- If, for any reason, the underlying resource gets updated or deleted, `TemplateGroupInstance` CR will try to revert it back to the state mentioned in the `Template` CR. | ||
|
||
!!! note | ||
If the updated field of the deployed manifest is not mentioned in the Template, it will not get reverted. | ||
For example, if `secrets` field is not mentioned in ServiceAcoount in the above Template, it will not get reverted if changed | ||
Updates to ServiceAccounts are ignored by both, reconciler and informers, in an attempt to avoid conflict between the TGI controller and Kube Controller Manager. ServiceAccounts are only reverted back in case of unexpected deletions when sync is true. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [LanguageTool] reported by reviewdog 🐶 |
||
|
||
## Ignore Resources Updates on Resources | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[LanguageTool] reported by reviewdog 🐶
A determiner cannot be combined with a possessive pronoun. Did you mean simply “the” or “its”? (A_MY[136])
Suggestions:
the
,its
Rule: https://community.languagetool.org/rule/show/A_MY?lang=en-US&subId=136
Category: COLLOCATIONS