Skip to content

Commit 86ad538

Browse files
committed
upgrade to helm v3 issue #100
Signed-off-by: Ali Mukadam <[email protected]>
1 parent bf7e1d7 commit 86ad538

File tree

12 files changed

+18
-80
lines changed

12 files changed

+18
-80
lines changed

CHANGELOG.adoc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,15 @@ All notable changes to this project are documented in this file.
77

88
The format is based on {uri-changelog}[Keep a Changelog].
99

10+
== v2.0.0-beta.2 (November 21, 2019)
11+
* Helm upgraded to version 3.0.0 #100
12+
* incubator and jetstack helm repos removed as they can now be searched from helm hub #100
13+
* tiller disabled and option to enable it is removed #100
14+
1015
== v2.0.0-beta.1 (November 14, 2019)
1116
* Added admin host for operations instead of using the bastion server #91
1217
* Installed Python3, oci-cli #91
13-
* Switched from kubeconfig v1 to v2, generated by oci-cli instead of uploading #91
18+
* Switched from kubeconfig v1 to v2, generated by oci-cli instead of uploading #98
1419
* Switched all operations from bastion to admin host #91
1520
* Use compartment id instead of compartment name for policies #86
1621
* Updated available list of Kubernetes versions in Terraform options #90

docs/configuration.adoc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
:uri-contribute: {uri-rel-file-base}/CONTRIBUTING.adoc
1818
:uri-contributors: {uri-rel-file-base}/CONTRIBUTORS.adoc
1919
:uri-helm: https://helm.sh/
20-
:uri-helm-incubator: https://kubernetes-charts-incubator.storage.googleapis.com/
21-
:uri-helm-jetstack: https://charts.jetstack.io
2220
:uri-instructions: {uri-docs}/instructions.adoc
2321
:uri-license: {uri-rel-file-base}/LICENSE.txt
2422
:uri-kubernetes: https://kubernetes.io/
@@ -202,10 +200,7 @@ kubectl --namespace=kube-system get secret ocirsecret --export -o yaml | kubectl
202200

203201
=== Configure helm parameters
204202

205-
The {uri-helm}[helm] parameters control the installation and the version of the helm client as well as optional helm repos to add and initialize on the bastion host. Additional helm repos include the following:
206-
207-
. {uri-helm-incubator}[incubator]
208-
. {uri-helm-jetstack}[jetstack]
203+
The {uri-helm}[helm] parameters control the installation and the version of the helm client as well as optional helm repos to add and initialize on the bastion host.
209204

210205
{uri-terraform-options}#helm[Reference]
211206

docs/terraformoptions.adoc

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
:uri-cert-manager: https://cert-manager.readthedocs.io/en/latest/
1313
:uri-docs: {uri-rel-file-base}/docs
1414
:uri-helm: https://helm.sh/
15-
:uri-helm-incubator: https://kubernetes-charts-incubator.storage.googleapis.com/
16-
:uri-helm-jetstack: https://charts.jetstack.io
1715
:uri-kubernetes-hpa: https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/
1816
:uri-metrics-server: https://github.com/kubernetes-incubator/metrics-server
1917
:uri-oci-images: https://docs.cloud.oracle.com/iaas/images/
@@ -442,11 +440,6 @@ node_pools = {
442440
|
443441
|10.96.0.0/16
444442
445-
|tiller_enabled
446-
|Whether to install the server side of Helm in the OKE cluster.
447-
|true/false
448-
|true
449-
450443
|worker_mode
451444
|Whether the worker nodes should be public or private. Private requires NAT gateway.
452445
|private/public
@@ -525,20 +518,10 @@ Refer to {uri-topology}[topology] for more thorough examples.
525518
|Values
526519
|Default
527520
528-
|add_incubator_repo
529-
|Whether to add the {uri-helm-incubator}[incubator] repo to the bastion's local helm repo.
530-
|true/false
531-
|false
532-
533-
|add_jetstack_repo
534-
|Whether to add the {uri-helm-jetstack}[jetstack] repo to the bastion's local helm repo. *Required* for {uri-cert-manager}[cert-manager].
535-
|true/false
536-
|false
537-
538521
|helm_version
539-
|The version of the {uri-helm}[helm] client to install on the bastion. A subsequent upgrade of tiller (server-side helm) will then be automatically performed.
522+
|The version of the {uri-helm}[helm] client to install on the bastion.
540523
|
541-
|2.14.3
524+
|3.0.0
542525
543526
|install_helm
544527
|Whether to install {uri-helm}[helm] on the bastion instance.

locals.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ locals {
117117
cluster_kubernetes_version = var.kubernetes_version
118118
cluster_name = var.cluster_name
119119
cluster_options_add_ons_is_kubernetes_dashboard_enabled = var.dashboard_enabled
120-
cluster_options_add_ons_is_tiller_enabled = var.tiller_enabled
120+
# cluster_options_add_ons_is_tiller_enabled = var.tiller_enabled
121121
cluster_options_kubernetes_network_config_pods_cidr = var.pods_cidr
122122
cluster_options_kubernetes_network_config_services_cidr = var.services_cidr
123123
cluster_subnets = module.network.subnet_ids
@@ -149,8 +149,6 @@ locals {
149149
}
150150

151151
helm = {
152-
add_incubator_repo = var.add_incubator_repo
153-
add_jetstack_repo = var.add_incubator_repo
154152
helm_version = var.helm_version
155153
install_helm = var.install_helm
156154
}

modules/oke/cluster.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resource "oci_containerengine_cluster" "k8s_cluster" {
1010
options {
1111
add_ons {
1212
is_kubernetes_dashboard_enabled = var.oke_cluster.cluster_options_add_ons_is_kubernetes_dashboard_enabled
13-
is_tiller_enabled = var.oke_cluster.cluster_options_add_ons_is_tiller_enabled
13+
is_tiller_enabled = false
1414
}
1515

1616
kubernetes_network_config {

modules/oke/helm.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ data "template_file" "install_helm" {
55
template = file("${path.module}/scripts/install_helm.template.sh")
66

77
vars = {
8-
add_incubator_repo = var.helm.add_incubator_repo
9-
add_jetstack_repo = var.helm.add_jetstack_repo
108
helm_version = var.helm.helm_version
119
}
1210

1311
count = var.oke_admin.admin_enabled == true && var.helm.install_helm == true ? 1 : 0
1412
}
1513

16-
resource null_resource "install_helm_bastion" {
14+
resource null_resource "install_helm_admin" {
1715
connection {
1816
host = var.oke_admin.admin_private_ip
1917
private_key = file(var.oke_ssh_keys.ssh_private_key_path)

modules/oke/ocir.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ data "template_file" "create_ocir_script" {
99
region_registry = var.oke_ocir.ocir_urls[var.oke_general.region]
1010
tenancy_name = var.oke_ocir.tenancy_name
1111
username = var.oke_ocir.username
12-
tiller_enabled = var.oke_cluster.cluster_options_add_ons_is_tiller_enabled
12+
# tiller_enabled = var.oke_cluster.cluster_options_add_ons_is_tiller_enabled
1313
}
1414

1515
count = var.oke_ocir.create_auth_token == true ? 1 : 0

modules/oke/scripts/create_ocir_secret.template.sh

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,5 @@
22
# Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
44

5-
if [ ${tiller_enabled} ]; then
6-
kubectl -n kube-system delete secret ocirsecret
7-
kubectl create secret docker-registry ocirsecret -n kube-system --docker-server=${region_registry} --docker-username=${tenancy_name}/${username} --docker-email=${email_address} --docker-password='${authtoken}'
8-
kubectl -n kube-system patch serviceaccount tiller -p '{"imagePullSecrets": [{"name": "ocirsecret"}]}'
9-
else
10-
kubectl -n default delete secret ocirsecret
11-
kubectl create secret docker-registry ocirsecret -n default --docker-server=${region_registry} --docker-username=${tenancy_name}/${username} --docker-email=${email_address} --docker-password='${authtoken}'
12-
fi
5+
kubectl -n default delete secret ocirsecret
6+
kubectl create secret docker-registry ocirsecret -n default --docker-server=${region_registry} --docker-username=${tenancy_name}/${username} --docker-email=${email_address} --docker-password='${authtoken}'

modules/oke/scripts/install_helm.template.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright 2017, 2019, Oracle Corporation and/or affiliates. All rights reserved.
33
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl
44

5-
wget https://storage.googleapis.com/kubernetes-helm/helm-v${helm_version}-linux-amd64.tar.gz
5+
wget https://get.helm.sh/helm-v${helm_version}-linux-amd64.tar.gz
66

77
tar zxvf helm-v${helm_version}-linux-amd64.tar.gz
88

@@ -12,16 +12,6 @@ rm -f helm-v${helm_version}-linux-amd64.tar.gz
1212

1313
rm -rf linux-amd64
1414

15-
helm init --upgrade
16-
17-
if [ ${add_incubator_repo} ]; then
18-
helm repo add incubator https://kubernetes-charts-incubator.storage.googleapis.com/
19-
fi
20-
21-
if [ ${add_jetstack_repo} ]; then
22-
helm repo add jetstack https://charts.jetstack.io
23-
fi
24-
2515
helm repo update
2616

2717
echo "source <(helm completion bash)" >> ~/.bashrc

modules/oke/variables.tf

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ variable "oke_cluster" {
4848
cluster_kubernetes_version = string
4949
cluster_name = string
5050
cluster_options_add_ons_is_kubernetes_dashboard_enabled = bool
51-
cluster_options_add_ons_is_tiller_enabled = bool
5251
cluster_options_kubernetes_network_config_pods_cidr = string
5352
cluster_options_kubernetes_network_config_services_cidr = string
5453
cluster_subnets = map(string)
@@ -100,8 +99,6 @@ variable "oke_ocir" {
10099
# helm
101100
variable "helm" {
102101
type = object({
103-
add_incubator_repo = bool
104-
add_jetstack_repo = bool
105102
helm_version = string
106103
install_helm = bool
107104
})

0 commit comments

Comments
 (0)