Skip to content

Commit 0787034

Browse files
fix: remove smtp from settings (#956)
1 parent 02f3def commit 0787034

6 files changed

Lines changed: 3 additions & 63 deletions

File tree

src/fileStore/file-map.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,6 @@ export function getFileMaps(envDir: string): Map<AplKind, FileMap> {
107107
name: 'platformBackups',
108108
})
109109

110-
maps.set('AplSmtp', {
111-
kind: 'AplSmtp',
112-
envDir,
113-
pathGlob: `${envDir}/env/settings/*smtp.{yaml,yaml.dec}`,
114-
pathTemplate: 'env/settings/smtp.yaml',
115-
name: 'smtp',
116-
})
117-
118110
maps.set('AplUser', {
119111
kind: 'AplUser',
120112
envDir,

src/openapi/settings.yaml

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -378,41 +378,4 @@ Settings:
378378
platformAdmin: [read-any, update-any]
379379
teamAdmin: [read]
380380
teamMember: [read]
381-
smtp:
382-
title: SMTP
383-
additionalProperties: false
384-
nullable: true
385-
properties:
386-
auth_identity:
387-
title: Authentication identity
388-
type: string
389-
auth_password:
390-
title: Authentication password
391-
type: string
392-
auth_secret:
393-
title: Authentication secret
394-
type: string
395-
auth_username:
396-
title: Authentication username
397-
type: string
398-
from:
399-
$ref: 'definitions.yaml#/email'
400-
description: The from address. Defaults to alerts@$clusterDomain.
401-
title: From address
402-
hello:
403-
description: The hostname to identify to the SMTP server.
404-
title: Hello
405-
type: string
406-
smarthost:
407-
description: The smtp host:port combination.
408-
pattern: ^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]):()([1-9]|[1-5]?[0-9]{2,4}|6[1-4][0-9]{3}|65[1-4][0-9]{2}|655[1-2][0-9]|6553[1-5])$
409-
type: string
410-
title: Smart Host
411-
required:
412-
- smarthost
413-
type: object
414-
x-acl:
415-
platformAdmin: [read-any, update-any]
416-
teamAdmin: []
417-
teamMember: []
418381
type: object

src/openapi/settingsinfo.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ SettingsInfo:
5959
branch:
6060
type: string
6161
description: The branch to use in the Git repository.
62-
smtp:
63-
properties:
64-
smarthost:
65-
type: string
6662
ingressClassNames:
6763
description: Ingress class names that are used by the cluster.
6864
items:

src/otomi-models.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ export type Alerts = Settings['alerts']
7171
export type Cluster = Settings['cluster']
7272
export type Dns = Settings['dns']
7373
export type Ingress = Settings['ingress']
74-
export type Smtp = Settings['smtp']
7574
export type Kms = Settings['kms']
7675
export type Oidc = Settings['oidc']
7776
export type Otomi = Settings['otomi']
@@ -112,7 +111,6 @@ export const APL_KINDS = [
112111
'AplKms',
113112
'AplIdentityProvider',
114113
'AplCapabilitySet',
115-
'AplSmtp',
116114
'AplBackupCollection',
117115
'AplUser',
118116
'AplPlatformSettingSet',
@@ -305,7 +303,6 @@ export interface Repo {
305303
oidc: Oidc
306304
otomi: Otomi
307305
platformBackups: Record<string, any>
308-
smtp: Smtp
309306
users: User[]
310307
versions: Versions
311308
teamConfig: Record<string, TeamConfig>

src/otomi-stack.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CoreV1Api, KubeConfig, User as k8sUser, V1ObjectReference } from '@kubernetes/client-node'
1+
import { CoreV1Api, User as k8sUser, KubeConfig, V1ObjectReference } from '@kubernetes/client-node'
22
import Debug from 'debug'
33

44
import { getRegions, ObjectStorageKeyRegions, Region, ResourcePage } from '@linode/api-v4'
@@ -123,6 +123,7 @@ import {
123123
getTeamSecretsFromK8s,
124124
watchPodUntilRunning,
125125
} from './k8s_operations'
126+
import CloudTty from './tty'
126127
import {
127128
getGiteaRepoUrls,
128129
getPrivateRepoBranches,
@@ -143,7 +144,6 @@ import {
143144
sparseCloneChart,
144145
validateGitUrl,
145146
} from './utils/workloadUtils'
146-
import CloudTty from './tty'
147147

148148
interface ExcludedApp extends App {
149149
managed: boolean
@@ -318,7 +318,7 @@ export default class OtomiStack {
318318
}
319319

320320
getSettingsInfo(): SettingsInfo {
321-
const settings = this.getSettings(['cluster', 'dns', 'otomi', 'smtp', 'ingress'])
321+
const settings = this.getSettings(['cluster', 'dns', 'otomi', 'ingress'])
322322
const otomiInfo = pick(settings.otomi, [
323323
'hasExternalDNS',
324324
'hasExternalIDP',
@@ -334,7 +334,6 @@ export default class OtomiStack {
334334
cluster: pick(settings.cluster, ['name', 'domainSuffix', 'apiServer', 'provider', 'linode']),
335335
dns: pick(settings.dns, ['zones']),
336336
otomi: otomiInfo,
337-
smtp: pick(settings.smtp, ['smarthost']),
338337
ingressClassNames: map(settings.ingress?.classes, 'className') ?? [],
339338
} as SettingsInfo
340339
}
@@ -2694,7 +2693,6 @@ export default class OtomiStack {
26942693
const settingsPrefixMap: Record<string, string> = {
26952694
AplDns: 'dns.',
26962695
AplKms: 'kms.',
2697-
AplSmtp: 'smtp.',
26982696
AplIdentityProvider: 'oidc.',
26992697
AplCapabilitySet: 'otomi.',
27002698
AplAlertSet: 'alerts.',

test/env/settings.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,4 @@ otomi:
5353
isHomeMonitored: true
5454
isMultitenant: true
5555
version: latest
56-
smtp:
57-
auth_password: somesecretvalue
58-
auth_identity: no-reply@doma.in
59-
from: no-reply@doma.in
60-
hello: doma.in
61-
smarthost: smtp-relay.gmail.com:587
6256
version: 5

0 commit comments

Comments
 (0)