Skip to content

Commit 3ea8c41

Browse files
author
Jason Schmidt
authored
chore: updates to fix digital ocean deployment (#177)
* chore: update cert-manager chart and crds * chore: update logagent (filebeat) chart version * chore: update nginx IC to latest chart version * chore: update prometheus chart to latest version * chore: update logstore (Elasticsearch) to latest chart versoin * chore: update observability to new yaml and new chart * chore: update example config with new values * fix: remediation of deployment bugs * fix: removed JWT-only logic from BoS * fix: remove logic for sirius_host from deprecated jwt deploys * fix: remove deprecated ingress-repo-only project * fix: adjust min kubectl version deployed * fix: refactor digitalocean to docean for variables
1 parent 01a563e commit 3ea8c41

File tree

6 files changed

+40
-46
lines changed

6 files changed

+40
-46
lines changed

config/pulumi/Pulumi.stackname.yaml.example

+4-4
Original file line numberDiff line numberDiff line change
@@ -324,13 +324,13 @@ config:
324324
# Digital Ocean Managed Kubernetes and Container Registry
325325
############################################################################
326326
# This is the Kubernetes version to install using Digital Ocean K8s.
327-
digitalocean:k8s_version: 1.22.8-do.1
327+
docean:k8s_version: 1.22.12-do.0
328328
# This is the default instance type used by Digital Ocean K8s.
329-
digitalocean:instance_size: s-2vcpu-4gb
329+
docean:instance_size: s-4vcpu-8gb
330330
# The desired node count of the Digital Ocean K8s cluster.
331-
digitalocean:node_count: 3
331+
docean:node_count: 3
332332
# The region to deploy the cluster
333-
digitalocean:region: sfo3
333+
docean:region: sfo3
334334
# Subscription tier for container registry
335335
digitalocean:container_registry_subscription_tier: starter
336336

pulumi/python/automation/providers/do.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def new_stack_config(self, env_config, defaults: Union[Dict[Hashable, Any], list
113113
config = super().new_stack_config(env_config, defaults)
114114

115115
if 'DIGITALOCEAN_TOKEN' not in env_config:
116-
config['digitalocean:token'] = input("Digital Ocean API token (this is stored in plain-text - "
116+
config['docean:token'] = input("Digital Ocean API token (this is stored in plain-text - "
117117
"alternatively this can be specified as the environment variable "
118118
"DIGITALOCEAN_TOKEN): ")
119119

@@ -131,42 +131,42 @@ def new_stack_config(self, env_config, defaults: Union[Dict[Hashable, Any], list
131131
print('Supported Kubernetes versions:')
132132
for slug in k8s_version_slugs:
133133
print(f' {slug}')
134-
default_version = defaults['digitalocean:k8s_version'] or k8s_version_slugs[0]
135-
config['digitalocean:k8s_version'] = input(f'Kubernetes version [{default_version}]: ').strip() or default_version
136-
print(f"Kubernetes version: {config['digitalocean:k8s_version']}")
134+
default_version = defaults['docean:k8s_version'] or k8s_version_slugs[0]
135+
config['docean:k8s_version'] = input(f'Kubernetes version [{default_version}]: ').strip() or default_version
136+
print(f"Kubernetes version: {config['docean:k8s_version']}")
137137

138138
# Kubernetes regions
139139
k8s_regions_json_str, _ = external_process.run(do_cli.get_kubernetes_regions_json())
140140
k8s_regions_json = json.loads(k8s_regions_json_str)
141-
default_region = defaults['digitalocean:region'] or k8s_regions_json[-1]['slug']
141+
default_region = defaults['docean:region'] or k8s_regions_json[-1]['slug']
142142

143143
print('Supported Regions:')
144144
for item in k8s_regions_json:
145145
print(f" {item['name']}: {item['slug']}")
146-
config['digitalocean:region'] = input(f'Region [{default_region}]: ').strip() or default_region
147-
print(f"Region: {config['digitalocean:region']}")
146+
config['docean:region'] = input(f'Region [{default_region}]: ').strip() or default_region
147+
print(f"Region: {config['docean:region']}")
148148

149149
# Kubernetes instance size
150150
k8s_sizes_json_str, _ = external_process.run(do_cli.get_kubernetes_instance_sizes_json())
151151
k8s_sizes_json = json.loads(k8s_sizes_json_str)
152152
k8s_sizes_slugs = [size['slug'] for size in k8s_sizes_json]
153-
default_size = defaults['digitalocean:instance_size'] or 's-2vcpu-4gb'
153+
default_size = defaults['docean:instance_size'] or 's-2vcpu-4gb'
154154

155155
print('Supported Instance Sizes:')
156156
for slug in k8s_sizes_slugs:
157157
print(f' {slug}')
158158

159-
config['digitalocean:instance_size'] = input(f'Instance size [{default_size}]: ').strip() or default_size
160-
print(f"Instance size: {config['digitalocean:instance_size']}")
159+
config['docean:instance_size'] = input(f'Instance size [{default_size}]: ').strip() or default_size
160+
print(f"Instance size: {config['docean:instance_size']}")
161161

162162
# Kubernetes instance count
163-
default_node_count = defaults['digitalocean:node_count'] or 3
164-
while 'digitalocean:node_count' not in config:
163+
default_node_count = defaults['docean:node_count'] or 3
164+
while 'docean:node_count' not in config:
165165
node_count = input('Node count for Kubernetes cluster '
166166
f'[{default_node_count}]: ').strip() or default_node_count
167167
if type(node_count) == int or node_count.isdigit():
168-
config['digitalocean:node_count'] = int(node_count)
169-
print(f"Node count: {config['digitalocean:node_count']}")
168+
config['docean:node_count'] = int(node_count)
169+
print(f"Node count: {config['docean:node_count']}")
170170

171171
return config
172172

@@ -217,16 +217,16 @@ def token(stack_config: Union[Mapping[str, Any], MutableMapping[str, auto._confi
217217
return env_config['DIGITALOCEAN_TOKEN']
218218

219219
# We were given a reference to a StackConfigParser object
220-
if 'config' in stack_config and 'digitalocean:token' in stack_config['config']:
221-
return stack_config['config']['digitalocean:token']
220+
if 'config' in stack_config and 'docean:token' in stack_config['config']:
221+
return stack_config['config']['docean:token']
222222

223223
# We were given a reference to a Pulumi Stack configuration
224-
if 'digitalocean:token' in stack_config:
225-
return stack_config['digitalocean:token'].value
224+
if 'docean:token' in stack_config:
225+
return stack_config['docean:token'].value
226226

227227
# Otherwise
228228
msg = 'When using the Digital Ocean provider, an API token must be specified - ' \
229-
'this token can be specified with the Pulumi config parameter digitalocean:token ' \
229+
'this token can be specified with the Pulumi config parameter docean:token ' \
230230
'or the environment variable DIGITALOCEAN_TOKEN'
231231
raise InvalidConfigurationException(msg)
232232

pulumi/python/infrastructure/digitalocean/container-registry/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from kic_util import external_process
77

8-
config = pulumi.Config('digitalocean')
8+
config = pulumi.Config('docean')
99
# valid values: starter, basic, professional
1010
subscription_tier = config.get('container_registry_subscription_tier')
1111
if not subscription_tier:

pulumi/python/infrastructure/digitalocean/dns-record/__main__.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ def extract_ip_address(lb_ingress):
2828
config = pulumi.Config('kic-helm')
2929
fqdn = config.require('fqdn')
3030

31-
ingress_domain = docean.Domain.get(resource_name='ingress-domain', id=fqdn, name=fqdn)
31+
#
32+
# Split our hostname off the domain name to build the DNS records
33+
#
34+
hostname, domainname = fqdn.split('.',1)
35+
36+
ingress_domain = docean.Domain.get(resource_name='ingress-domain', id=domainname, name=domainname)
3237
ingress_a_record = docean.DnsRecord(resource_name='ingress-a-record',
33-
name='@',
38+
name=hostname,
3439
domain=ingress_domain.id,
3540
type="A",
3641
ttl=1800,

pulumi/python/infrastructure/digitalocean/domk8s/__main__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
from kic_util import pulumi_config
77
# Configuration details for the K8 cluster
8-
config = pulumi.Config('digitalocean')
8+
config = pulumi.Config('docean')
99
instance_size = config.get('instance_size')
1010
if not instance_size:
11-
instance_size = 's-2vcpu-4gb'
11+
instance_size = 's-4vcpu-8gb'
1212
region = config.get('region')
1313
if not region:
1414
region = 'sfo3'
15-
node_count = config.get('node_count')
15+
node_count = config.get_int('node_count')
1616
if not node_count:
1717
node_count = 3
1818
k8s_version = config.get('k8s_version')
@@ -41,7 +41,7 @@ def container_registry_project_name():
4141
node_pool=KubernetesClusterNodePoolArgs(
4242
name=pool_name,
4343
size=instance_size,
44-
node_count=node_count,
44+
node_count=node_count
4545
))
4646

4747
kubeconfig = cluster.kube_configs[0].raw_config

pulumi/python/kubernetes/applications/sirius/__main__.py

+5-16
Original file line numberDiff line numberDiff line change
@@ -363,22 +363,11 @@ def add_namespace(obj):
363363
)],
364364
))
365365

366-
# We use the kubernetes namespace for this
367-
config = pulumi.Config('kubernetes')
368-
infra_type = config.require('infra_type')
369-
if infra_type == 'AWS':
370-
application_url = sirius_host.apply(lambda host: f'https://{host}')
371-
pulumi.export('application_url', application_url)
372-
elif infra_type == 'kubeconfig':
373-
pulumi.export('hostname', lb_ingress_hostname)
374-
pulumi.export('ipaddress', lb_ingress_ip)
375-
# pulumi.export('application_url', f'https://{lb_ingress_hostname}')
376-
application_url = sirius_host.apply(lambda host: f'https://{host}')
377-
elif infra_type == 'DO':
378-
pulumi.export('hostname', lb_ingress_hostname)
379-
pulumi.export('ipaddress', lb_ingress_ip)
380-
# pulumi.export('application_url', f'https://{lb_ingress_hostname}')
381-
application_url = sirius_host.apply(lambda host: f'https://{host}')
366+
#
367+
# Get the hostname for our connect URL
368+
#
369+
application_url = sirius_host.apply(lambda host: f'https://{host}')
370+
pulumi.export('application_url', application_url)
382371

383372
#
384373
# Get the chart values for both monitoring charts, switch back to the Sirius

0 commit comments

Comments
 (0)