Skip to content
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

Intro tutorials for About API use cases #13

Open
lauralorenz opened this issue Nov 17, 2022 · 4 comments
Open

Intro tutorials for About API use cases #13

lauralorenz opened this issue Nov 17, 2022 · 4 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

Comments

@lauralorenz
Copy link
Contributor

Develop some vendor agnostic intro tutorials about the About API that can be easily digested as part of a generic documentation push. I think it would be useful to tie them to some common use cases as suggested below.

  • About API for storing cluster name and sending as prometheus label in your metrics instrumentation
  • About API for storing arbitrary, implementation specific cluster properties following the rules listed here and discussed on this slide, possibly a cluster's network name, region, etc
@lauralorenz
Copy link
Contributor Author

/help

@k8s-ci-robot
Copy link
Contributor

@lauralorenz:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. label Nov 17, 2022
@holgerson97
Copy link
Contributor

/assign

@holgerson97
Copy link
Contributor

holgerson97 commented Nov 14, 2024

Hello @lauralorenz,

regarding an example using metrics, should we present code snippets on how to append the ClusterProperty into the metrics via the Kubernetes Go-Client?

Would something like this be sufficient for the second point?


Simple Example for About-API

This example will guide you through the setup and usage, demonstrating how to effectively leverage ClusterProperty to enhance your Kubernetes operations.

Assume you are running multiple Kubernetes clusters. Each clusters has a main purpose e.g. ClusterBootstrapping via CAPI, running your business applications. In order to assign each clusters main purpose as ClusterProperty follow the below example.

ClusterProperty

When choosing a name for the ClusterProperty CR consider the following:

  • Name must have a suffix as below
  • Cannot use the reserved *k8s.io or *.kubernetes.io suffix
  • Do not conflict with the well-known CluserProperties
# Simple Usecase Example
apiVersion: about.k8s.io/v1alpha1
kind: ClusterProperty
metadata:
  name: usecase.example.com
spec:
  value: webserver

Examples

# Owner Example
apiVersion: about-api.k8s.io/v1
kind: ClusterProperty
metadata:
  name: owner
spec:
  value: DevOps-Team
# Compliance Example
apiVersion: about-api.k8s.io/v1
kind: ClusterProperty
metadata:
  name: compliance
spec:
  value: PCI-DSS
# Environment Example
apiVersion: about-api.k8s.io/v1
kind: ClusterProperty
metadata:
  name: environment
spec:
  value: production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
Projects
None yet
Development

No branches or pull requests

3 participants