-
Notifications
You must be signed in to change notification settings - Fork 109
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
fix: some fixes for karpenter deploy #358
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ locals { | |
karpenter = { | ||
name = try(var.helm.release_name, "karpenter") | ||
enabled = true | ||
chart = try(var.helm.chart_name, "karpenter") | ||
repository = try(var.helm.repository, "oci://public.ecr.aws/karpenter") | ||
chart_version = try(var.helm.chart_version, "1.0.0") | ||
chart = try(var.helm.chart_name, "oci://public.ecr.aws/karpenter/karpenter") | ||
repository = try(var.helm.repository, "") | ||
chart_version = try(var.helm.chart_version, "1.0.3") | ||
namespace = try(var.helm.namespace, "karpenter") | ||
} | ||
|
||
|
@@ -30,8 +30,6 @@ controller: | |
VALUES | ||
} | ||
|
||
data "aws_ecrpublic_authorization_token" "token" {} | ||
|
||
module "this" { | ||
count = local.karpenter.enabled ? 1 : 0 | ||
|
||
|
@@ -66,7 +64,7 @@ resource "kubectl_manifest" "ec2nodeclass_private" { | |
count = local.karpenter.enabled ? 1 : 0 | ||
|
||
yaml_body = <<EOF | ||
apiVersion: karpenter.sh/v1 | ||
apiVersion: karpenter.k8s.aws/v1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: private | ||
|
@@ -98,7 +96,7 @@ resource "kubectl_manifest" "ec2nodeclass_public" { | |
count = local.karpenter.enabled ? 1 : 0 | ||
|
||
yaml_body = <<EOF | ||
apiVersion: karpenter.sh/v1 | ||
apiVersion: karpenter.k8s.aws/v1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: public | ||
|
@@ -144,8 +142,6 @@ resource "helm_release" "this" { | |
version = local.karpenter.chart_version | ||
namespace = module.namespace[count.index].name | ||
max_history = 3 | ||
repository_username = data.aws_ecrpublic_authorization_token.token.user_name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure it works. Let's test it together There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested this yesterday in the sandbox account, and in the in one of the projects. All works fine. More over, this data works only for |
||
repository_password = data.aws_ecrpublic_authorization_token.token.password | ||
|
||
values = [ | ||
local.karpenter_values | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Why did you change this? What was the problem here?
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.
This configuration worked for github-runners that also use oci helm repository. And it's working now for deploy karpenter in the some project.
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've added information about this changes in the description of the PR