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

Golang support in cdk8s import #26

Closed
Tracked by #119
iliapolo opened this issue Apr 13, 2021 · 0 comments · Fixed by #48
Closed
Tracked by #119

Golang support in cdk8s import #26

iliapolo opened this issue Apr 13, 2021 · 0 comments · Fixed by #48
Assignees
Labels
effort/medium 1 week tops feature-request New/Enhanced functionality wanted priority/p0 Needs to be addressed immediately

Comments

@iliapolo
Copy link
Member

Users need to be able to generate L1 API's in golang using the CLI.

cdk8s import -l go k8s
@iliapolo iliapolo transferred this issue from cdk8s-team/cdk8s Jul 6, 2021
@iliapolo iliapolo added the needs-triage Priority and effort undetermined yet label Aug 9, 2021
@iliapolo iliapolo added effort/medium 1 week tops priority/p0 Needs to be addressed immediately feature-request New/Enhanced functionality wanted and removed needs-triage Priority and effort undetermined yet labels Aug 9, 2021
@mergify mergify bot closed this as completed in #48 Aug 12, 2021
mergify bot pushed a commit that referenced this issue Aug 12, 2021
Resolves #26 
Resolves #27

`cdk8s init go-app` now initializes a Go app with k8s imports. When run in a directory named "my-app", the following files will be generated:

```
├── cdk8s.yaml
├── dist
│   └── my-app.k8s.yaml
├── go.mod
├── go.sum
├── help
├── imports
│   └── k8s
│       ├── internal
│       │   └── types.go
│       ├── jsii
│       │   ├── jsii.go
│       │   └── k8s-0.0.0.tgz
│       ├── k8s.go
│       ├── k8s.init.go
│       └── version
└── main.go
```

`cdk8s import <spec> --language go` now imports the k8s spec or custom resource definitions in Go. Each CRD generates a package in an "imports" directory, and package names are generated based on Go idiomatic naming conventions. 

Tested on golang v1.16.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/medium 1 week tops feature-request New/Enhanced functionality wanted priority/p0 Needs to be addressed immediately
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants