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

Added kubernetes specs #34

Merged
merged 8 commits into from Oct 29, 2019
Merged

Added kubernetes specs #34

merged 8 commits into from Oct 29, 2019

Conversation

ShahNewazKhan
Copy link
Contributor

#31

  • Added kubernetes templates
  • Added kubernetes config
  • Added kubernetes generate

@Direside Direside added this to Backlog in Commit0 Oct 17, 2019
)

var supportedLanguages = [...]string{Go, React}
var supportedLanguages = [...]string{Go, React, Kubernetes}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be called something else rather than "languages" if it's the right place for this. Or maybe we should start splitting this into sections.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, rename it modules? @Pritesh-Patel

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry about this for now, I'll do some refactoring.


```shell

terraform plan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we roll all this stuff into the application to run?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By application run, do you mean the result of commit0 generate -l kubernetes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that event I should also create an s3 bucket and save the tf.state there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is fine for now, but I feel like we need a new command like commit0 run that actually runs everything. Because generate may create a whole bunch of stuff that needs to get run by various applications. I'll mention it in Slack

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per slack convo, added deploy flag for the commit0.yaml kuberntes config, if it's set to true, will run terraform init & terraform plan

# * Route Table
#

resource "aws_vpc" "demo" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the community VPC module

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented

type = "ingress"
}

resource "aws_eks_cluster" "demo" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the community EKS module

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented

_tf_plan := tf_plan()
execute(_tf_init)
execute(_tf_plan)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will add in terraform apply once both eks and vpc has been converted to community modules

var errStdout, errStderr error
stdoutIn, _ := cmd.StdoutPipe()
stderrIn, _ := cmd.StderrPipe()
stdout := NewCapturingPassThroughWriter(os.Stdout)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is all this stuff for? You should be able to get the above stdoutpipe and then just call go io.Copy(os.Stdout, stdoutIn)

# TODO, determine if this should be true/false
manage_aws_auth = true

write_kubeconfig = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is manage_aws_auth even able to function if these two lines are false?

Copy link
Contributor Author

@ShahNewazKhan ShahNewazKhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bmonkman bmonkman merged commit 6b7e4f6 into master Oct 29, 2019
@bmonkman bmonkman deleted the kubernetes branch October 29, 2019 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Commit0
  
Backlog
Development

Successfully merging this pull request may close these issues.

None yet

3 participants