- .github
- actions
- api
- blueprints
-
cmd
-
timoni
- testdata
- apply.go
- apply_test.go
- artifact.go
- artifact_list.go
- artifact_pull.go
- artifact_pull_test.go
- artifact_push.go
- artifact_push_test.go
- artifact_tag.go
- artifact_tag_test.go
- build.go
- build_test.go
- bundle.go
- bundle_apply.go
- bundle_apply_test.go
- bundle_build.go
- bundle_build_test.go
- bundle_delete.go
- bundle_delete_test.go
- bundle_status.go
- bundle_status_test.go
- bundle_vet.go
- bundle_vet_test.go
- completion.go
- completion_bash.go
- completion_fish.go
- completion_funcs.go
- completion_powershell.go
- completion_zsh.go
- delete.go
- delete_test.go
- docgen.go
- dyff.go
- dyff_test.go
- errors.go
- inspect.go
- inspect_module.go
- inspect_resources.go
- inspect_test.go
- inspect_values.go
- list.go
- log.go
- main.go
- main_test.go
- mod.go
- mod_init.go
- mod_list.go
- mod_list_test.go
- mod_pull.go
- mod_pull_test.go
- mod_push.go
- mod_push_test.go
- mod_show.go
- mod_show_config.go
- mod_show_config_test.go
- mod_vendor.go
- mod_vendor_crd.go
- mod_vendor_crd_test.go
- mod_vendor_k8s.go
- mod_vet.go
- mod_vet_test.go
- registry.go
- runtime.go
- runtime_build.go
- runtime_build_test.go
- status.go
- status_test.go
- version.go
- version_test.go
-
timoni
- docs
-
examples
- bundles
-
minimal
- cue.mod
- templates
- README.md
- debug_tool.cue
- debug_values.cue
- timoni.cue
- values.cue
- redis
- hack
-
internal
-
engine
- fetcher
- testdata
- bundle_builder.go
- bundle_builder_test.go
- doc.go
- importer.go
- importer_test.go
- module_builder.go
- module_builder_test.go
- resourceset.go
- resourceset_test.go
- runtime_builder.go
- runtime_builder_test.go
- runtime_injector.go
- runtime_injector_test.go
- utils.go
- utils_test.go
- values_builder.go
- values_builder_test.go
- flags
- oci
- runtime
- testutils
-
engine
- logo
- schemas
- .gitattributes
- .gitignore
- .goreleaser.yml
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- DCO
- LICENSE
- Makefile
- README.md
- SECURITY.md
- go.mod
- go.sum
- mkdocs.yml
- proto-plugin.toml
Explanation
This code defines the API structure for Timoni’s instances within a Kubernetes environment. It’s a crucial part of Timoni’s functionality, allowing users to manage their Kubernetes resources with configurations from Helm modules.
Key Concepts:
Selectors: The
APIVersionSelector
,InstanceSelector
,ConfigValuesSelector
,ApplySelector
, andValuesSelector
constants define CUE paths used to access specific data within Timoni’s configurations. These selectors are likely used for parsing and manipulating the configuration data.InstanceSchema: This constant defines the CUE schema for Timoni’s instance API, which acts as a blueprint for validating and structuring the instance data. It defines the required and optional fields for an instance, including:
apiVersion
: The version of the Timoni API.instance
: This field holds the instance-specific data, including the module reference and values.apply
: This field is likely used for defining the Kubernetes resources that should be managed by Timoni.kubeMinorVersion
: An optional field likely used for specifying the targeted Kubernetes minor version.Instance Struct: This struct represents a Timoni instance, holding the following information:
TypeMeta
: Metadata about the API type and version.ObjectMeta
: Kubernetes metadata for the instance.Module
: A reference to the Helm module used by this instance.Values
: The user-provided configuration values for the instance.LastTransitionTime
: Timestamp of the last inventory update.Inventory
: A reference to the Kubernetes resources managed by the instance.Images
: A list of container image references.
Functionality:
- Defining the API: This code defines the structure of Timoni’s instance API, defining the fields and their expected types.
- Validating Data: The CUE schema enforces consistency and validity of instance data, ensuring that Timoni operates correctly.
- Instance Representation: The
Instance
struct provides a clear, structured representation of a Timoni instance within the system.
Overall: This code defines the basic structure and data representation for Timoni instances, which serve as the foundation for Timoni’s management of Kubernetes resources based on Helm modules and user configurations.
Graph
The graph shows the usage of functions within the codebase.
Select a code symbol to view it's graph