diff --git a/API.md b/API.md
index 870eed1..e5ae5f4 100644
--- a/API.md
+++ b/API.md
@@ -139,174 +139,136 @@ public readonly frontendServiceName: string;
## Structs
-### PloneOptions
+### PloneBaseOptions
-#### Initializer
+#### Initializer
```typescript
-import { PloneOptions } from 'cdk8s-plone'
+import { PloneBaseOptions } from 'cdk8s-plone'
-const ploneOptions: PloneOptions = { ... }
+const ploneBaseOptions: PloneBaseOptions = { ... }
```
#### Properties
| **Name** | **Type** | **Description** |
| --- | --- | --- |
-| backendEnvironment
| cdk8s-plus-24.Env
| *No description.* |
-| backendImage
| string
| *No description.* |
-| backendImagePullPolicy
| string
| *No description.* |
-| backendImagePullSecret
| string
| *No description.* |
-| backendMaxUnavailable
| string \| number
| *No description.* |
-| backendMinAvailable
| string \| number
| *No description.* |
-| backendReplicas
| number
| *No description.* |
-| frontendEnvironment
| cdk8s-plus-24.Env
| *No description.* |
-| frontendImage
| string
| *No description.* |
-| frontendImagePullPolicy
| string
| *No description.* |
-| frontendImagePullSecret
| string
| *No description.* |
-| frontendMaxUnavailable
| string \| number
| *No description.* |
-| frontendMinAvailable
| string \| number
| *No description.* |
-| frontendReplicas
| number
| *No description.* |
+| environment
| cdk8s-plus-24.Env
| *No description.* |
+| image
| string
| *No description.* |
+| imagePullPolicy
| string
| *No description.* |
+| maxUnavailable
| string \| number
| *No description.* |
+| minAvailable
| string \| number
| *No description.* |
+| replicas
| number
| *No description.* |
---
-##### `backendEnvironment`Optional
+##### `environment`Optional
```typescript
-public readonly backendEnvironment: Env;
+public readonly environment: Env;
```
- *Type:* cdk8s-plus-24.Env
---
-##### `backendImage`Optional
-
-```typescript
-public readonly backendImage: string;
-```
-
-- *Type:* string
-
----
-
-##### `backendImagePullPolicy`Optional
+##### `image`Optional
```typescript
-public readonly backendImagePullPolicy: string;
+public readonly image: string;
```
- *Type:* string
---
-##### `backendImagePullSecret`Optional
+##### `imagePullPolicy`Optional
```typescript
-public readonly backendImagePullSecret: string;
+public readonly imagePullPolicy: string;
```
- *Type:* string
---
-##### `backendMaxUnavailable`Optional
+##### `maxUnavailable`Optional
```typescript
-public readonly backendMaxUnavailable: string | number;
+public readonly maxUnavailable: string | number;
```
- *Type:* string | number
---
-##### `backendMinAvailable`Optional
+##### `minAvailable`Optional
```typescript
-public readonly backendMinAvailable: string | number;
+public readonly minAvailable: string | number;
```
- *Type:* string | number
---
-##### `backendReplicas`Optional
+##### `replicas`Optional
```typescript
-public readonly backendReplicas: number;
+public readonly replicas: number;
```
- *Type:* number
---
-##### `frontendEnvironment`Optional
-
-```typescript
-public readonly frontendEnvironment: Env;
-```
-
-- *Type:* cdk8s-plus-24.Env
-
----
+### PloneOptions
-##### `frontendImage`Optional
+#### Initializer
```typescript
-public readonly frontendImage: string;
-```
-
-- *Type:* string
-
----
-
-##### `frontendImagePullPolicy`Optional
+import { PloneOptions } from 'cdk8s-plone'
-```typescript
-public readonly frontendImagePullPolicy: string;
+const ploneOptions: PloneOptions = { ... }
```
-- *Type:* string
-
----
-
-##### `frontendImagePullSecret`Optional
-
-```typescript
-public readonly frontendImagePullSecret: string;
-```
+#### Properties
-- *Type:* string
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| backend
| PloneBaseOptions
| *No description.* |
+| frontend
| PloneBaseOptions
| *No description.* |
+| imagePullSecrets
| string[]
| *No description.* |
---
-##### `frontendMaxUnavailable`Optional
+##### `backend`Optional
```typescript
-public readonly frontendMaxUnavailable: string | number;
+public readonly backend: PloneBaseOptions;
```
-- *Type:* string | number
+- *Type:* PloneBaseOptions
---
-##### `frontendMinAvailable`Optional
+##### `frontend`Optional
```typescript
-public readonly frontendMinAvailable: string | number;
+public readonly frontend: PloneBaseOptions;
```
-- *Type:* string | number
+- *Type:* PloneBaseOptions
---
-##### `frontendReplicas`Optional
+##### `imagePullSecrets`Optional
```typescript
-public readonly frontendReplicas: number;
+public readonly imagePullSecrets: string[];
```
-- *Type:* number
+- *Type:* string[]
---
diff --git a/src/index.ts b/src/index.ts
index ff5097c..9f63106 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1 +1 @@
-export { Plone, PloneOptions } from './plone';
+export { Plone, PloneOptions, PloneBaseOptions } from './plone';
diff --git a/src/plone.ts b/src/plone.ts
index c2889ba..1bd58c2 100644
--- a/src/plone.ts
+++ b/src/plone.ts
@@ -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 {
@@ -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,
@@ -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,