Skip to content

Commit

Permalink
added classname to ExposeDeploymentViaIngressOptions
Browse files Browse the repository at this point in the history
Signed-off-by: Yash Israni <yashisrani52@gmail.com>
  • Loading branch information
yashisrani committed Jan 30, 2025
1 parent 705a999 commit fd0d6f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ export interface DeploymentExposeViaServiceOptions {
/**
* Options for exposing a deployment via an ingress.
*/
export interface ExposeDeploymentViaIngressOptions extends DeploymentExposeViaServiceOptions, service.ExposeServiceViaIngressOptions {}
export interface ExposeDeploymentViaIngressOptions extends DeploymentExposeViaServiceOptions, service.ExposeServiceViaIngressOptions {
readonly className?: string;
}

/**
*
Expand Down Expand Up @@ -221,7 +223,10 @@ export class Deployment extends workload.Workload implements IScalable {
*/
public exposeViaIngress(path: string, options: ExposeDeploymentViaIngressOptions = {}): ingress.Ingress {
const ser = this.exposeViaService(options);
return ser.exposeViaIngress(path, options);
return ser.exposeViaIngress(path, {
...options,
className: options.className,
});
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export interface ExposeServiceViaIngressOptions {
* @default - An ingress will be automatically created.
*/
readonly ingress?: ingress.Ingress;
readonly className?: string;
}

/**
Expand Down

0 comments on commit fd0d6f3

Please sign in to comment.