@@ -61,16 +61,15 @@ Deployment of arbitrary kubernetes manifests can leverage the following construc
61
61
62
62
``` typescript
63
63
import { KubernetesManifest } from " aws-cdk-lib/aws-eks" ;
64
- import { ClusterAddOn , ClusterInfo } from " ../../spi" ;
65
- import { loadYaml , readYamlDocument } from " ../../utils/yaml-utils" ;
64
+ import * as blueprints from " @aws-quickstart/eks-blueprints" ;
66
65
67
- export class MyNonHelmAddOn implements ClusterAddOn {
68
- deploy(clusterInfo : ClusterInfo ): void {
66
+ export class MyNonHelmAddOn implements blueprints . ClusterAddOn {
67
+ deploy(clusterInfo : blueprints . ClusterInfo ): void {
69
68
const cluster = clusterInfo .cluster ;
70
69
// Apply manifest
71
- const doc = readYamlDocument (__dirname + ' /my-product.yaml' );
70
+ const doc = blueprints . utils . readYamlDocument (__dirname + ' /my-product.yaml' );
72
71
// ... apply any substitutions for dynamic values
73
- const manifest = docArray .split (" ---" ).map (e => loadYaml (e ));
72
+ const manifest = doc .split (" ---" ).map (e => blueprints . utils . loadYaml (e ));
74
73
new KubernetesManifest (cluster .stack , " myproduct-manifest" , {
75
74
cluster ,
76
75
manifest ,
@@ -92,17 +91,15 @@ Example:
92
91
93
92
``` typescript
94
93
import { Construct } from " constructs" ;
95
- import { ClusterInfo } from " ../../spi" ;
96
- import { dependable } from " ../../utils" ;
97
- import { HelmAddOn , HelmAddOnUserProps } from " ../helm-addon" ;
94
+ import * as blueprints from " @aws-quickstart/eks-blueprints" ;
98
95
99
- export class MyProductAddOn extends HelmAddOn {
96
+ export class MyProductAddOn extends blueprints . HelmAddOn {
100
97
101
98
readonly options: MyProductAddOnProps ; // extends HelmAddOnUserProps
102
99
103
100
...
104
101
105
- @dependable (' AwsLoadBalancerControllerAddOn' ) // depends on AwsLoadBalancerController
102
+ @@ blueprints . utils . dependable (' AwsLoadBalancerControllerAddOn' ) // depends on AwsLoadBalancerController
106
103
deploy(clusterInfo : ClusterInfo ): Promise <Construct > {
107
104
...
108
105
}
0 commit comments