-
Notifications
You must be signed in to change notification settings - Fork 9
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
adding edge-native example #395
Open
dmitry-spectro
wants to merge
16
commits into
main
Choose a base branch
from
doc-updates
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
17eca04
adding edge-native example
dmitry-spectro 0c50d1a
Merge branch 'main' into doc-updates
nikchern 7ee32b7
DOC-889 adding cluster_vsphere example to template as requested by Karl
dmitry-spectro 361e93e
Merge branch 'doc-updates' of github.com:spectrocloud/terraform-provi…
dmitry-spectro 1bedb75
DOC-894 adding cluster_edge_native template
dmitry-spectro 83be222
DOC-968 adding vSphere and edge cluster profiles
dmitry-spectro f9fe6d3
DOC-908 adding an example of addon deployment
dmitry-spectro cd21552
DOC-967 adding cloudaccount_coxedge example
dmitry-spectro 8632608
DOC-953 adding example for cluster_coxedge
dmitry-spectro 774ad00
DOC-889 adding feedback from Nikolay and Karl: including examples in …
dmitry-spectro 30020ba
DOC-894 adding tffile inclusion for edge-native
dmitry-spectro cdefa4b
DOC-968 moving three cluster profiles to corresponding locations and …
dmitry-spectro 13392a3
DOC-908 providing examples of adding an add-on profile and applying i…
dmitry-spectro fb8d01d
DOC-967 adding cloudaccount_coxedge example
dmitry-spectro 796a68a
DOC-953 adding template and examples for coxedge cluster and profile …
dmitry-spectro f0387ee
DOC-889 modifying headers as suggested by Karl
dmitry-spectro File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
resource "local_file" "kubeconfig" { | ||
content = spectrocloud_cluster_edge_native.cluster.kubeconfig | ||
filename = "kubeconfig_ne-2" | ||
content = local.cluster_kubeconfig | ||
filename = "kubeconfig_edge-1" | ||
file_permission = "0644" | ||
directory_permission = "0755" | ||
# sensitive_content = true | ||
} |
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
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 |
---|---|---|
@@ -1,7 +1,66 @@ | ||
data "spectrocloud_cluster_profile" "profile" { | ||
name = "edge-native-infra" | ||
#Define a public repo as registry for packs | ||
data "spectrocloud_registry" "registry" { | ||
name = "Public Repo" | ||
} | ||
|
||
output "same" { | ||
value = data.spectrocloud_cluster_profile.profile | ||
} | ||
data "spectrocloud_pack" "cni" { | ||
registry_uid = data.spectrocloud_registry.registry.id | ||
name = "cni-calico" | ||
version = "3.26.1" | ||
} | ||
|
||
data "spectrocloud_pack" "k8s" { | ||
registry_uid = data.spectrocloud_registry.registry.id | ||
name = "edge-k3s" | ||
version = "1.27.2" | ||
} | ||
|
||
data "spectrocloud_pack" "os" { | ||
registry_uid = data.spectrocloud_registry.registry.id | ||
name = "edge-native-byoi" | ||
version = "1.0.0" | ||
} | ||
|
||
resource "spectrocloud_cluster_profile" "profile" { | ||
name = "edge-profile-tf" | ||
description = "basic cp" | ||
tags = ["dev", "department:devops", "owner:alice"] | ||
cloud = "edge-native" | ||
type = "cluster" | ||
|
||
pack { | ||
name = data.spectrocloud_pack.os.name | ||
tag = data.spectrocloud_pack.os.version | ||
uid = data.spectrocloud_pack.os.id | ||
#values = data.spectrocloud_pack.os.values | ||
values = <<-EOT | ||
pack: | ||
content: | ||
images: | ||
- image: "{{.spectro.pack.edge-native-byoi.options.system.uri}}" | ||
options: | ||
system.uri: "{{ .spectro.pack.edge-native-byoi.options.system.registry }}/{{ .spectro.pack.edge-native-byoi.options.system.repo }}:{{ .spectro.pack.edge-native-byoi.options.system.k8sDistribution }}-{{ .spectro.system.kubernetes.version }}-{{ .spectro.pack.edge-native-byoi.options.system.peVersion }}-{{ .spectro.pack.edge-native-byoi.options.system.customTag }}" | ||
system.registry: HERE-GOES-YOUR-REGISTRY | ||
system.repo: ubuntu | ||
system.k8sDistribution: k3s | ||
system.osName: ubuntu | ||
system.peVersion: v4.1.2 | ||
system.customTag: HERE-GOES-YOUR-CUSTOM-TAG | ||
system.osVersion: 22 | ||
EOT | ||
} | ||
|
||
pack { | ||
name = data.spectrocloud_pack.k8s.name | ||
tag = data.spectrocloud_pack.k8s.version | ||
uid = data.spectrocloud_pack.k8s.id | ||
values = data.spectrocloud_pack.k8s.values | ||
} | ||
|
||
pack { | ||
name = data.spectrocloud_pack.cni.name | ||
tag = data.spectrocloud_pack.cni.version | ||
uid = data.spectrocloud_pack.cni.id | ||
values = data.spectrocloud_pack.cni.values | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
# Cluster | ||
variable "cluster_ssh_key_name" { | ||
default = "spectro2020" | ||
default = "spectro2024" | ||
} | ||
|
||
variable "vip" {} | ||
variable "edge_id" {} | ||
|
||
#variable "master_appliance_name" {} | ||
|
||
#variable "worker_appliance_name" {} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Let's put some description about use-cases where static IP may be optional.
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.
Overall I would wait for overlay feature to land before we revisit this example.