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

services generated with invalid spec definition #41

Open
ghost opened this issue Sep 11, 2016 · 0 comments
Open

services generated with invalid spec definition #41

ghost opened this issue Sep 11, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 11, 2016

While attempting to convert the bundled docker-compose.yml to a k8s config, services are generated with an invalid ServiceSpec definition.

Per v1.ServiceSpec there is no field defined as ExternalName.

This has the side effect of causing the services to not launch correctly.

Tested with clusters built with both minikube and kube-aws.

  • kube-aws cluster version
johnt  ⋯  gitroot   compose2kube  kubectl version                                                                                                                                                          master ★ 0.0.2  01:49
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.6+ae4550c", GitCommit:"ae4550cc9c89a593bcda6678df201db1b208133b", GitTreeState:"not a git tree", BuildDate:"2016-08-30T15:45:51Z", GoVersion:"go1.7", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.2+coreos.0", GitCommit:"52a0d5141b1c1e7449189bb0be3374d610eb98e0", GitTreeState:"clean", BuildDate:"2016-07-19T17:45:13Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
  • via kube-aws cluster:
 johnt  ⋯  gitroot  compose2kube  kubectl create -f ./output                                                                                                                                               master ★ 0.0.2  01:48
replicationcontroller "cache" created
replicationcontroller "database" created
replicationcontroller "web" created
error validating "output/cache-srv.yml": error validating data: found invalid field ExternalName for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false
error validating "output/database-srv.yml": error validating data: found invalid field ExternalName for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false
error validating "output/web-srv.yml": error validating data: found invalid field ExternalName for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false
  • minikube cluster version
 johnt  ⋯  gitroot  compose2kube  kubectl version                                                                                                                                                          master ★ 0.0.2  02:04
Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.6+ae4550c", GitCommit:"ae4550cc9c89a593bcda6678df201db1b208133b", GitTreeState:"not a git tree", BuildDate:"2016-08-30T15:45:51Z", GoVersion:"go1.7", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.3", GitCommit:"c6411395e09da356c608896d3d9725acab821418", GitTreeState:"dirty", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
  • via minikube cluster
 johnt  ⋯  gitroot  compose2kube  kubectl create -f ./output                                                                                                                                          1   master ★ 0.0.2  02:05
replicationcontroller "cache" created
replicationcontroller "database" created
replicationcontroller "web" created
error validating "output/cache-srv.yml": error validating data: found invalid field ExternalName for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false
error validating "output/database-srv.yml": error validating data: found invalid field ExternalName for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false
error validating "output/web-srv.yml": error validating data: found invalid field ExternalName for v1.ServiceSpec; if you choose to ignore these errors, turn validation off with --validate=false
  • generated service config (output/cache-srv.yml)
apiVersion: v1
kind: Service
metadata:
  creationTimestamp: null
  name: cache
  namespace: default
spec:
  ExternalName: ""
  ports:
  - name: ""
    nodePort: 0
    port: 11211
    protocol: ""
    targetPort: 0
  selector:
    service: cache
status:
  loadBalancer: {}

Should this field be removed from the generated file?

I don't see a reference in the source either https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/service.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants