{"owner":"kubernetes","repo":"kompose","hasSkills":true,"totalSkillsCount":1,"totalTokensCount":752,"categories":["project-spec"],"hasMcp":false,"mcpConfig":null,"found":["docs/architecture.md"],"skills":{"docs/architecture.md":"---\nlayout: default\npermalink: /architecture/\ntitle: Architecture\nredirect_from:\n  - /docs/architecture.md/\n  - /docs/architecture/\n---\n\n# Architecture and Internal Design\n\n* TOC\n{:toc}\n\n`kompose` has 3 stages: _Loader_, _Transformer_ and _Outputter_. Each stage should have a well-defined interface, so it is easy to write a new Loader, Transformer, or Outputters and plug it in. Currently, only Loader and Transformer interfaces are defined.\n\n![Design Diagram](https://raw.githubusercontent.com/kubernetes/kompose/main/docs/images/design_diagram.png)\n\n## Loader\n\nThe Loader reads the input file now `kompose` supports [Compose](https://docs.docker.com/compose) v1, v2 and converts it to KomposeObject.\n\nLoader is represented by a Loader interface:\n\n```go\ntype Loader interface {\n      LoadFile(file string) kobject.KomposeObject\n}\n```\n\nEvery loader “implementation” should be placed into `kompose/pkg/loader` (like compose). More input formats will be supported in the future. You can take a look for more details at:\n\n- [kompose/pkg/loader](https://github.com/kubernetes/kompose/tree/master/pkg/loader)\n- [kompose/pkg/loader/compose](https://github.com/kubernetes/kompose/tree/master/pkg/loader/compose)\n\n## KomposeObject\n\n`KomposeObject` is Kompose internal representation of all containers loaded from input file. First version of `KomposeObject` looks like this (source: [kobject.go](https://github.com/kubernetes/kompose/blob/master/pkg/kobject/kobject.go)):\n\n```go\n// KomposeObject holds the generic struct of Kompose transformation\ntype KomposeObject struct {\n    ServiceConfigs map[string]ServiceConfig\n}\n\n// ServiceConfig holds the basic struct of a container\ntype ServiceConfig struct {\n    ContainerName string\n    Image         string\n    Environment   []EnvVar\n    Port          []Ports\n    Command       []string\n    WorkingDir    string\n    Args          []string\n    Volumes       []string\n    Network       []string\n    Labels        map[string]string\n    Annotations   map[string]string\n    CPUSet        string\n    CPUShares     int64\n    CPUQuota      int64\n    CapAdd        []string\n    CapDrop       []string\n    Entrypoint    []string\n    Expose        []string\n    Privileged    bool\n    Restart       string\n    User          string\n}\n```\n\n## Transformer\n\nThe Transformer takes KomposeObject and converts it to target/output format (currently, there are sets of Kubernetes/OpenShift objects). Similar to the `Loader`, Transformer is represented by a Transformer interface:\n\n```go\ntype Transformer interface {\n     Transform(kobject.KomposeObject, kobject.ConvertOptions) []runtime.Object\n}\n```\n\nIf you wish to add more providers containing different kinds of objects, the Transformer would be the place to look into. Currently, Kompose supports Kubernetes (by default) and OpenShift providers. More details at:\n\n- [kompose/pkg/transformer](https://github.com/kubernetes/kompose/tree/master/pkg/transformer)\n- [kompose/pkg/transformer/Kubernetes](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/kubernetes)\n- [kompose/pkg/transformer/openshift](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/openshift)\n\n## Outputter\n\nThe Outputter takes the Transformer result and executes the given action. For example, action can display results to stdout or directly deploy artifacts to Kubernetes/OpenShift.\n"},"files":{"docs/architecture.md":"---\nlayout: default\npermalink: /architecture/\ntitle: Architecture\nredirect_from:\n  - /docs/architecture.md/\n  - /docs/architecture/\n---\n\n# Architecture and Internal Design\n\n* TOC\n{:toc}\n\n`kompose` has 3 stages: _Loader_, _Transformer_ and _Outputter_. Each stage should have a well-defined interface, so it is easy to write a new Loader, Transformer, or Outputters and plug it in. Currently, only Loader and Transformer interfaces are defined.\n\n![Design Diagram](https://raw.githubusercontent.com/kubernetes/kompose/main/docs/images/design_diagram.png)\n\n## Loader\n\nThe Loader reads the input file now `kompose` supports [Compose](https://docs.docker.com/compose) v1, v2 and converts it to KomposeObject.\n\nLoader is represented by a Loader interface:\n\n```go\ntype Loader interface {\n      LoadFile(file string) kobject.KomposeObject\n}\n```\n\nEvery loader “implementation” should be placed into `kompose/pkg/loader` (like compose). More input formats will be supported in the future. You can take a look for more details at:\n\n- [kompose/pkg/loader](https://github.com/kubernetes/kompose/tree/master/pkg/loader)\n- [kompose/pkg/loader/compose](https://github.com/kubernetes/kompose/tree/master/pkg/loader/compose)\n\n## KomposeObject\n\n`KomposeObject` is Kompose internal representation of all containers loaded from input file. First version of `KomposeObject` looks like this (source: [kobject.go](https://github.com/kubernetes/kompose/blob/master/pkg/kobject/kobject.go)):\n\n```go\n// KomposeObject holds the generic struct of Kompose transformation\ntype KomposeObject struct {\n    ServiceConfigs map[string]ServiceConfig\n}\n\n// ServiceConfig holds the basic struct of a container\ntype ServiceConfig struct {\n    ContainerName string\n    Image         string\n    Environment   []EnvVar\n    Port          []Ports\n    Command       []string\n    WorkingDir    string\n    Args          []string\n    Volumes       []string\n    Network       []string\n    Labels        map[string]string\n    Annotations   map[string]string\n    CPUSet        string\n    CPUShares     int64\n    CPUQuota      int64\n    CapAdd        []string\n    CapDrop       []string\n    Entrypoint    []string\n    Expose        []string\n    Privileged    bool\n    Restart       string\n    User          string\n}\n```\n\n## Transformer\n\nThe Transformer takes KomposeObject and converts it to target/output format (currently, there are sets of Kubernetes/OpenShift objects). Similar to the `Loader`, Transformer is represented by a Transformer interface:\n\n```go\ntype Transformer interface {\n     Transform(kobject.KomposeObject, kobject.ConvertOptions) []runtime.Object\n}\n```\n\nIf you wish to add more providers containing different kinds of objects, the Transformer would be the place to look into. Currently, Kompose supports Kubernetes (by default) and OpenShift providers. More details at:\n\n- [kompose/pkg/transformer](https://github.com/kubernetes/kompose/tree/master/pkg/transformer)\n- [kompose/pkg/transformer/Kubernetes](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/kubernetes)\n- [kompose/pkg/transformer/openshift](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/openshift)\n\n## Outputter\n\nThe Outputter takes the Transformer result and executes the given action. For example, action can display results to stdout or directly deploy artifacts to Kubernetes/OpenShift.\n"},"items":[{"name":"architecture.md","path":"docs/architecture.md","rawUrl":"https://raw.githubusercontent.com/kubernetes/kompose/HEAD/docs/architecture.md","title":"docs - System Architecture & Module Boundaries","category":"project-spec","format":"markdown","content":"---\nlayout: default\npermalink: /architecture/\ntitle: Architecture\nredirect_from:\n  - /docs/architecture.md/\n  - /docs/architecture/\n---\n\n# Architecture and Internal Design\n\n* TOC\n{:toc}\n\n`kompose` has 3 stages: _Loader_, _Transformer_ and _Outputter_. Each stage should have a well-defined interface, so it is easy to write a new Loader, Transformer, or Outputters and plug it in. Currently, only Loader and Transformer interfaces are defined.\n\n![Design Diagram](https://raw.githubusercontent.com/kubernetes/kompose/main/docs/images/design_diagram.png)\n\n## Loader\n\nThe Loader reads the input file now `kompose` supports [Compose](https://docs.docker.com/compose) v1, v2 and converts it to KomposeObject.\n\nLoader is represented by a Loader interface:\n\n```go\ntype Loader interface {\n      LoadFile(file string) kobject.KomposeObject\n}\n```\n\nEvery loader “implementation” should be placed into `kompose/pkg/loader` (like compose). More input formats will be supported in the future. You can take a look for more details at:\n\n- [kompose/pkg/loader](https://github.com/kubernetes/kompose/tree/master/pkg/loader)\n- [kompose/pkg/loader/compose](https://github.com/kubernetes/kompose/tree/master/pkg/loader/compose)\n\n## KomposeObject\n\n`KomposeObject` is Kompose internal representation of all containers loaded from input file. First version of `KomposeObject` looks like this (source: [kobject.go](https://github.com/kubernetes/kompose/blob/master/pkg/kobject/kobject.go)):\n\n```go\n// KomposeObject holds the generic struct of Kompose transformation\ntype KomposeObject struct {\n    ServiceConfigs map[string]ServiceConfig\n}\n\n// ServiceConfig holds the basic struct of a container\ntype ServiceConfig struct {\n    ContainerName string\n    Image         string\n    Environment   []EnvVar\n    Port          []Ports\n    Command       []string\n    WorkingDir    string\n    Args          []string\n    Volumes       []string\n    Network       []string\n    Labels        map[string]string\n    Annotations   map[string]string\n    CPUSet        string\n    CPUShares     int64\n    CPUQuota      int64\n    CapAdd        []string\n    CapDrop       []string\n    Entrypoint    []string\n    Expose        []string\n    Privileged    bool\n    Restart       string\n    User          string\n}\n```\n\n## Transformer\n\nThe Transformer takes KomposeObject and converts it to target/output format (currently, there are sets of Kubernetes/OpenShift objects). Similar to the `Loader`, Transformer is represented by a Transformer interface:\n\n```go\ntype Transformer interface {\n     Transform(kobject.KomposeObject, kobject.ConvertOptions) []runtime.Object\n}\n```\n\nIf you wish to add more providers containing different kinds of objects, the Transformer would be the place to look into. Currently, Kompose supports Kubernetes (by default) and OpenShift providers. More details at:\n\n- [kompose/pkg/transformer](https://github.com/kubernetes/kompose/tree/master/pkg/transformer)\n- [kompose/pkg/transformer/Kubernetes](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/kubernetes)\n- [kompose/pkg/transformer/openshift](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/openshift)\n\n## Outputter\n\nThe Outputter takes the Transformer result and executes the given action. For example, action can display results to stdout or directly deploy artifacts to Kubernetes/OpenShift.\n","frontmatter":{"layout":"default","permalink":"/architecture/","title":"Architecture","redirect_from":["/docs/architecture.md/","/docs/architecture/"]},"isInternal":false,"tokens":752,"sizeBytes":3364}],"systemPromptSnippet":"<yakaai_skills repo=\"kubernetes/kompose\">\n<!-- File: docs/architecture.md (Tokens: ~752 | Category: project-spec) -->\n---\nlayout: default\npermalink: /architecture/\ntitle: Architecture\nredirect_from:\n  - /docs/architecture.md/\n  - /docs/architecture/\n---\n\n# Architecture and Internal Design\n\n* TOC\n{:toc}\n\n`kompose` has 3 stages: _Loader_, _Transformer_ and _Outputter_. Each stage should have a well-defined interface, so it is easy to write a new Loader, Transformer, or Outputters and plug it in. Currently, only Loader and Transformer interfaces are defined.\n\n![Design Diagram](https://raw.githubusercontent.com/kubernetes/kompose/main/docs/images/design_diagram.png)\n\n## Loader\n\nThe Loader reads the input file now `kompose` supports [Compose](https://docs.docker.com/compose) v1, v2 and converts it to KomposeObject.\n\nLoader is represented by a Loader interface:\n\n```go\ntype Loader interface {\n      LoadFile(file string) kobject.KomposeObject\n}\n```\n\nEvery loader “implementation” should be placed into `kompose/pkg/loader` (like compose). More input formats will be supported in the future. You can take a look for more details at:\n\n- [kompose/pkg/loader](https://github.com/kubernetes/kompose/tree/master/pkg/loader)\n- [kompose/pkg/loader/compose](https://github.com/kubernetes/kompose/tree/master/pkg/loader/compose)\n\n## KomposeObject\n\n`KomposeObject` is Kompose internal representation of all containers loaded from input file. First version of `KomposeObject` looks like this (source: [kobject.go](https://github.com/kubernetes/kompose/blob/master/pkg/kobject/kobject.go)):\n\n```go\n// KomposeObject holds the generic struct of Kompose transformation\ntype KomposeObject struct {\n    ServiceConfigs map[string]ServiceConfig\n}\n\n// ServiceConfig holds the basic struct of a container\ntype ServiceConfig struct {\n    ContainerName string\n    Image         string\n    Environment   []EnvVar\n    Port          []Ports\n    Command       []string\n    WorkingDir    string\n    Args          []string\n    Volumes       []string\n    Network       []string\n    Labels        map[string]string\n    Annotations   map[string]string\n    CPUSet        string\n    CPUShares     int64\n    CPUQuota      int64\n    CapAdd        []string\n    CapDrop       []string\n    Entrypoint    []string\n    Expose        []string\n    Privileged    bool\n    Restart       string\n    User          string\n}\n```\n\n## Transformer\n\nThe Transformer takes KomposeObject and converts it to target/output format (currently, there are sets of Kubernetes/OpenShift objects). Similar to the `Loader`, Transformer is represented by a Transformer interface:\n\n```go\ntype Transformer interface {\n     Transform(kobject.KomposeObject, kobject.ConvertOptions) []runtime.Object\n}\n```\n\nIf you wish to add more providers containing different kinds of objects, the Transformer would be the place to look into. Currently, Kompose supports Kubernetes (by default) and OpenShift providers. More details at:\n\n- [kompose/pkg/transformer](https://github.com/kubernetes/kompose/tree/master/pkg/transformer)\n- [kompose/pkg/transformer/Kubernetes](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/kubernetes)\n- [kompose/pkg/transformer/openshift](https://github.com/kubernetes/kompose/tree/master/pkg/transformer/openshift)\n\n## Outputter\n\nThe Outputter takes the Transformer result and executes the given action. For example, action can display results to stdout or directly deploy artifacts to Kubernetes/OpenShift.\n</yakaai_skills>"}