Skip to content
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

bsc#1174919 #85

Merged
merged 7 commits into from
Sep 18, 2020
Merged

bsc#1174919 #85

merged 7 commits into from
Sep 18, 2020

Conversation

bear454
Copy link
Member

@bear454 bear454 commented Aug 13, 2020

Deploy in EKS can fail due to operations taking longer than the expiration period of the k8s auth token generated by terraform, and terraform not having a built-in mechanism to renew the token:

hashicorp/terraform#24886

I'm working around this by ensuring kubernetes operations occur up-front, and helm operations use the kubecontrol file instead, which request a new token on each use.

In addition, due to other outstanding issues, we've elected to upgrade the helm and kubernetes provider versions.

Copy link
Contributor

@satadruroy satadruroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor comments and approving based on our discussion but we should look at some of the suggested cleanup.

echo "...but received status ${code}; will check again in a minute ..."
sleep 60
echo "...but received status $code; will check again shortly ..."
sleep 10
Copy link
Contributor

@satadruroy satadruroy Sep 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UAA doesn't come up until about 20+ minutes into the CAP deploy and because of the asynchronous nature of the helm installs (with wait = false) this script can kick in right after the helm installs have triggered so waiting for only 10s is lot of unnecessary polling but only gaining little less than a minute in triggering the final metrics install.

name = "susecf-metrics"
repository = "https://kubernetes-charts.suse.com"
chart = "metrics"
version = "1.2.1"
namespace = "metrics"
wait = "false"
wait = "true"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this to be true - there's nothing else dependent on it. The CAP deployment will take its time too and we are telling the end user to check the pod status for readiness.

@@ -127,7 +119,9 @@ resource "helm_release" "scf" {
resource "helm_release" "stratos" {
depends_on = [
helm_release.scf,
kubernetes_namespace.stratos
kubernetes_namespace.stratos,
null_resource.cluster_issuer_setup,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? In v1, stratos is not using cert-manager.

"AWS_ACCESS_KEY_ID" = var.access_key_id
"AWS_SECRET_ACCESS_KEY" = var.secret_access_key
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to avoid the token expiry problem? Could using the load_config_file = true work?

@bear454
Copy link
Member Author

bear454 commented Sep 18, 2020

Issues noted; I'll resolve in a subsequent PR.

@bear454 bear454 merged commit 99e0208 into SUSE:master Sep 18, 2020
viccuad pushed a commit to viccuad/cap-terraform that referenced this pull request Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants