Skip to content

Commit

Permalink
do not dup secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Jun 28, 2024
1 parent e4124bf commit f2115ed
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 84 deletions.
120 changes: 41 additions & 79 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { Plone, PloneOptions } from './plone';
export { Plone, PloneOptions, PloneBaseOptions } from './plone';
7 changes: 3 additions & 4 deletions src/plone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ import { PloneService } from './service';

export interface PloneBaseOptions {
readonly image?: string;
readonly imagePullSecrets?: string[];
readonly imagePullPolicy?: string;
readonly replicas?: number;
readonly maxUnavailable?: number | string;
readonly minAvailable?: number | string;
readonly environment?: kplus.Env;

}
export interface PloneOptions {
readonly backend?: PloneBaseOptions;
readonly frontend?: PloneBaseOptions;
readonly imagePullSecrets?: string[];
}

export class Plone extends Construct {
Expand All @@ -33,7 +32,7 @@ export class Plone extends Construct {
const backendDeployment = new PloneDeployment(this, 'backend', {
image: {
image: backend.image ?? 'plone/plone-backend:latest',
imagePullSecrets: backend.imagePullSecrets ?? [],
imagePullSecrets: options.imagePullSecrets ?? [],
imagePullPolicy: backend.imagePullPolicy ?? 'IfNotPresent',
},
replicas: backend.replicas,
Expand Down Expand Up @@ -61,7 +60,7 @@ export class Plone extends Construct {
const frontendDeployment = new PloneDeployment(this, 'frontend', {
image: {
image: frontend.image ?? 'plone/plone-frontend:latest',
imagePullSecrets: frontend.imagePullSecrets ?? [],
imagePullSecrets: options.imagePullSecrets ?? [],
imagePullPolicy: frontend.imagePullPolicy ?? 'IfNotPresent',
},
replicas: frontend.replicas,
Expand Down

0 comments on commit f2115ed

Please sign in to comment.