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
Conversation
) | ||
|
||
var supportedLanguages = [...]string{Go, React} | ||
var supportedLanguages = [...]string{Go, React, Kubernetes} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
templates/kubernetes/teraform/vpc.tf
Outdated
# * Route Table | ||
# | ||
|
||
resource "aws_vpc" "demo" { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented
generate/kubernetes/generate.go
Outdated
_tf_plan := tf_plan() | ||
execute(_tf_init) | ||
execute(_tf_plan) | ||
} |
There was a problem hiding this comment.
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
…on commit0 kubernetes vars
ee791dc
to
c6aa884
Compare
var errStdout, errStderr error | ||
stdoutIn, _ := cmd.StdoutPipe() | ||
stderrIn, _ := cmd.StderrPipe() | ||
stdout := NewCapturingPassThroughWriter(os.Stdout) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
#31