-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add jsonnet definition for centos servers in aws.
- Loading branch information
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
local archon = import "archon.alpha.1/a.libsonnet"; | ||
local centos = import "archon.alpha.1/os/centos/mixins.libsonnet"; | ||
local aws = import "archon.alpha.1/cloud/aws/mixins.libsonnet"; | ||
local mixins = import "archon.alpha.1/cloud/aws/centos/mixins.libsonnet"; | ||
|
||
archon + { | ||
v1:: archon.v1 + aws + centos + mixins, | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
instanceGroup+:: { | ||
config+:: { | ||
image:: "ami-af4333cf", | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
instanceGroup+:: { | ||
new(name):: | ||
local spec = self.mixin.spec.template.spec; | ||
local metadata = self.mixin.spec.template.metadata; | ||
local secretType = self.mixin.spec.template.spec.secretsType; | ||
local initializers = self.config.initializers; | ||
super.new(name) + | ||
spec.instanceType(self.config.instanceType) + | ||
spec.networkName(self.config.networkName) + | ||
spec.image(self.config.image), | ||
config+:: { | ||
instanceType:: "t2.small", | ||
}, | ||
}, | ||
master+:: { | ||
new(name):: | ||
local metadata = self.mixin.spec.template.metadata; | ||
local instanceProfile = self.config.instanceProfile; | ||
local annotations = { | ||
"aws.archon.kubeup.com/instance-profile": instanceProfile, | ||
}; | ||
super.new(name) + | ||
metadata.annotations(annotations), | ||
}, | ||
network+:: { | ||
new(name):: | ||
local nameServers = self.config.nameServers; | ||
local domainName = self.config.region + ".compute.internal"; | ||
local annotations = { | ||
"aws.archon.kubeup.com/name-servers": nameServers, | ||
"aws.archon.kubeup.com/domain-name": domainName, | ||
}; | ||
local labels = { | ||
"KubernetesCluster": "kubernetes", | ||
}; | ||
super.new(name) + | ||
self.mixin.metadata.annotations(annotations) + | ||
self.mixin.metadata.labels(labels) + | ||
self.mixin.status.phase("Pending"), | ||
config+:: { | ||
nameServers:: "169.254.169.253", | ||
}, | ||
}, | ||
} |