-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor spark-k8s-operator for helm-addon (#309)
* refactor spark-k8s-operator for helm-addon * terraform-docs: automated action * fix var name * fix copy pasta * revert module name * terraform-docs: automated action * account for spark and spark operator irsa policies * terraform-docs: automated action * add module * irsa config is not required * terraform-docs: automated action * fix variable names * remove comment * terraform-docs: automated action * spark operator addon update * terraform-docs: automated action * Addon context added to spark operator * precommit format update Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Vara Bonthu <vara.bonthu@gmail.com>
- Loading branch information
1 parent
4388556
commit ea0922f
Showing
12 changed files
with
97 additions
and
173 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
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
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
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
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,77 +1,19 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: MIT-0 | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this | ||
* software and associated documentation files (the "Software"), to deal in the Software | ||
* without restriction, including without limitation the rights to use, copy, modify, | ||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
* permit persons to whom the Software is furnished to do so. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
module "helm_addon" { | ||
source = "../helm-addon" | ||
manage_via_gitops = var.manage_via_gitops | ||
helm_config = local.helm_config | ||
irsa_config = null | ||
addon_context = var.addon_context | ||
|
||
resource "helm_release" "spark_k8s_operator" { | ||
count = var.manage_via_gitops ? 0 : 1 | ||
name = local.helm_config["name"] | ||
repository = local.helm_config["repository"] | ||
chart = local.helm_config["chart"] | ||
version = local.helm_config["version"] | ||
namespace = local.helm_config["namespace"] | ||
timeout = local.helm_config["timeout"] | ||
values = local.helm_config["values"] | ||
create_namespace = local.helm_config["create_namespace"] | ||
lint = local.helm_config["lint"] | ||
description = local.helm_config["description"] | ||
repository_key_file = local.helm_config["repository_key_file"] | ||
repository_cert_file = local.helm_config["repository_cert_file"] | ||
repository_ca_file = local.helm_config["repository_ca_file"] | ||
repository_username = local.helm_config["repository_username"] | ||
repository_password = local.helm_config["repository_password"] | ||
verify = local.helm_config["verify"] | ||
keyring = local.helm_config["keyring"] | ||
disable_webhooks = local.helm_config["disable_webhooks"] | ||
reuse_values = local.helm_config["reuse_values"] | ||
reset_values = local.helm_config["reset_values"] | ||
force_update = local.helm_config["force_update"] | ||
recreate_pods = local.helm_config["recreate_pods"] | ||
cleanup_on_fail = local.helm_config["cleanup_on_fail"] | ||
max_history = local.helm_config["max_history"] | ||
atomic = local.helm_config["atomic"] | ||
skip_crds = local.helm_config["skip_crds"] | ||
render_subchart_notes = local.helm_config["render_subchart_notes"] | ||
disable_openapi_validation = local.helm_config["disable_openapi_validation"] | ||
wait = local.helm_config["wait"] | ||
wait_for_jobs = local.helm_config["wait_for_jobs"] | ||
dependency_update = local.helm_config["dependency_update"] | ||
replace = local.helm_config["replace"] | ||
|
||
postrender { | ||
binary_path = local.helm_config["postrender"] | ||
} | ||
|
||
dynamic "set" { | ||
iterator = each_item | ||
for_each = local.helm_config["set"] == null ? [] : local.helm_config["set"] | ||
|
||
content { | ||
name = each_item.value.name | ||
value = each_item.value.value | ||
} | ||
} | ||
depends_on = [kubernetes_namespace_v1.this] | ||
} | ||
|
||
dynamic "set_sensitive" { | ||
iterator = each_item | ||
for_each = local.helm_config["set_sensitive"] == null ? [] : local.helm_config["set_sensitive"] | ||
resource "kubernetes_namespace_v1" "this" { | ||
metadata { | ||
name = local.helm_config["namespace"] | ||
|
||
content { | ||
name = each_item.value.name | ||
value = each_item.value.value | ||
labels = { | ||
"app.kubernetes.io/managed-by" = "terraform-ssp-amazon-eks" | ||
} | ||
} | ||
} |
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
Oops, something went wrong.