Skip to content

Commit

Permalink
chore(mrs): update mrs config
Browse files Browse the repository at this point in the history
  • Loading branch information
dmicheneau committed Jan 19, 2023
1 parent 11cbdf0 commit edad185
Show file tree
Hide file tree
Showing 10 changed files with 473 additions and 40 deletions.
35 changes: 33 additions & 2 deletions apis/mrs/v1beta1/zz_cluster_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 47 additions & 1 deletion apis/mrs/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

86 changes: 81 additions & 5 deletions apis/mrs/v1beta1/zz_generated.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion apis/mrs/v1beta1/zz_generated_terraformed.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions apis/mrs/v1beta1/zz_job_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 2 additions & 12 deletions config/mrs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ func Configure(p *config.Provider) {
// flexibleengine_mrs_cluster_v2
// https://registry.terraform.io/providers/FlexibleEngineCloud/flexibleengine/latest/docs/resources/mrs_cluster_v2
p.AddResourceConfigurator("flexibleengine_mrs_cluster_v2", func(r *config.Resource) {
r.UseAsync = true
// vpc_id
r.References["vpc_id"] = config.Reference{
Type: tools.GenerateType("vpc", "VPC"),
}
// subnet_id
r.References["subnet_id"] = config.Reference{
Type: tools.GenerateType("vpc", "Subnet"),
}
// eip_id
r.References["eip_id"] = config.Reference{
Type: tools.GenerateType("eip", "EIP"),
Expand All @@ -32,11 +23,11 @@ func Configure(p *config.Provider) {
}
// node_key_pair
r.References["node_key_pair"] = config.Reference{
Type: tools.GenerateType("compute", "KeyPair"),
Type: tools.GenerateType("ecs", "KeyPair"),
}
// security_group_ids
r.References["security_group_ids"] = config.Reference{
Type: tools.GenerateType("networking", "SecGroup"),
Type: tools.GenerateType("vpc", "SecurityGroup"),
Extractor: tools.GenerateExtractor(true, "id"),
SelectorFieldName: "SecurityGroupSelector",
RefFieldName: "SecurityGroupRefs",
Expand All @@ -50,7 +41,6 @@ func Configure(p *config.Provider) {
r.References["cluster_id"] = config.Reference{
Type: tools.GenerateType("mrs", "Cluster"),
}
r.UseAsync = true
})

}
7 changes: 3 additions & 4 deletions examples-generated/mrs/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ spec:
rootVolumeSize: 300
rootVolumeType: SAS
name: ${var.cluster_name}
nodeKeyPairSecretRef:
key: example-key
name: example-secret
namespace: upbound-system
nodeKeyPairSelector:
matchLabels:
testing.upbound.io/example-name: example
subnetIdSelector:
matchLabels:
testing.upbound.io/example-name: example_subnet
Expand Down
4 changes: 3 additions & 1 deletion examples-generated/mrs/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ metadata:
name: test
spec:
forProvider:
clusterId: ${var.cluster_id}
clusterIdSelector:
matchLabels:
testing.upbound.io/example-name: example
name: ${var.job_name}
parameters: ${var.access_key} ${var.secret_key} 1 s3a://obs-demo-analysis/input
s3a://obs-demo-analysis/output
Expand Down
Loading

0 comments on commit edad185

Please sign in to comment.