Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Istio Suite of Addons with CNI and Ingress Gateway Addons. #928

Merged
merged 30 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5e15e9e
Upgrade Istio Suite of Addons with CNI and Ingress Gateway
elamaran11 Feb 13, 2024
351699e
Upgrade Istio Suite of Addons with CNI and Ingress Gateway
elamaran11 Feb 13, 2024
82328e4
Upgrade Istio Suite of Addons with CNI and Ingress Gateway
elamaran11 Feb 13, 2024
47f75cd
ISTIO Cni Resources to Doc
elamaran11 Feb 13, 2024
88f2ca8
ISTIO Cni Resources to Doc
elamaran11 Feb 13, 2024
2fabf0e
ISTIO IG Resources to Doc
elamaran11 Feb 13, 2024
9c8d52f
ISTIO IG Resources to Doc
elamaran11 Feb 13, 2024
58f8a60
ISTIO IG Resources to Doc
elamaran11 Feb 13, 2024
8ac9c17
Fixes #930
shapirov103 Feb 14, 2024
65ed939
first commit - adding the addons, manifests, and example with GPU nodes
youngjeong46 Jul 16, 2023
b5193c6
add documentations
youngjeong46 Jul 16, 2023
684a064
slight fix to the docs
youngjeong46 Jul 16, 2023
3145176
test fix, lint fix, and removed local testing example blueprint
youngjeong46 Oct 12, 2023
f642af6
doc fix to remove nodegroup
youngjeong46 Oct 13, 2023
d86d405
added back GPU node group
youngjeong46 Oct 13, 2023
68ea954
removed local neuron yaml files in place of urls
youngjeong46 Oct 13, 2023
e8aa8e7
removing local construct test
youngjeong46 Oct 13, 2023
3030b1e
removed unneccessary yaml util, added jsdocs on helper functions
youngjeong46 Oct 13, 2023
0d3ef7d
changed mkdocks and docs/index.md to point to neuron addon
Feb 12, 2024
7b79e19
Fix for Bug#921:Load balancer controller warning message incomplete
Feb 13, 2024
d0c8642
Fix for Bug#921:Load balancer controller message
Feb 14, 2024
02056eb
ISTIO PR Fix
elamaran11 Feb 20, 2024
c3ad97e
ISTIO PR Fix 2
elamaran11 Feb 20, 2024
0d18275
ISTIO PR Fix 3
elamaran11 Feb 20, 2024
4835aa0
ISTIO PR Fix 4
elamaran11 Feb 20, 2024
bb3288e
ISTIO PR Fix 5
elamaran11 Feb 20, 2024
0e32c2b
ISTIO PR Fix 5
elamaran11 Feb 20, 2024
c5d7112
Merge branch 'main' into feature/upgradeIstiAddons
elamaran11 Feb 20, 2024
30b600a
ISTIO PR Fix 5
elamaran11 Feb 20, 2024
724f9ae
ISTIO PR Fix 5
elamaran11 Feb 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/addons/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ The framework currently supports the following add-ons.
| [`IstioBaseAddOn`](./istio-base.md) | Adds support for Istio base chart to the EKS cluster. | ✅ | ✅ |
| [`InstanaAddOn`](./instana-addon.md) | Adds the IBM® [Instana®](https://www.ibm.com/products/instana) [Agent Operator](https://github.com/instana/instana-agent-operator) to the EKS cluster. | ✅ | ✅ |
| [`IstioControlPlaneAddOn`](./istio-control-plane.md) | Installs Istio Control Plane addon to the EKS cluster. | ✅ | ✅ |
| [`IstioCniAddOn`](./istio-cni.md) | Installs Istio Cni Plugin addon to the EKS cluster. | ✅ | ✅ |
| [`IstioIngressGatewayAddOn`](./istio-ingress-gateway.md) | Installs Istio Ingress Gateway Plugin to the EKS cluster. | ✅ | ✅ |
| [`JupyterHubAddOn`](./jupyterhub.md) | Adds [JupyterHub](https://zero-to-jupyterhub.readthedocs.io/en/latest/#) support for AWS to the cluster. | ✅ | ✅ |
| [`Kasten-K10AddOn`](./kasten-k10.md) | Kasten K10 add-on installs Kasten K10 into your Amazon EKS cluster. | ✅ |
| [`KedaAddOn`](./keda.md) | Installs [Keda](https://github.com/kedacore/keda) into EKS cluster. | ✅ | ✅ |
Expand Down
61 changes: 61 additions & 0 deletions docs/addons/istio-cni.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Istio Cni Add-on

Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. The Istio CNI plugin performs the Istio mesh pod traffic redirection in the Kubernetes pod lifecycle’s network setup phase, thereby removing the requirement for the NET_ADMIN and NET_RAW capabilities for users deploying pods into the Istio mesh.

***IMPORTANT***:

1. This add-on depends on [Istio Base](istio-base.md) and [istio Control Plane](istio-control-plane.md) Add-ons for cluster-wide resources and CRDs.

***Istio Base add-on and Istio Control Plane addon-on must be present in add-on array*** and ***must be in add-on array before the Istio Cni add-on*** for it to work, as shown in below example. Otherwise will run into error `Assertion failed: Missing a dependency for IstioBaseAddOn`.

## Usage

Add the following as an add-on to your main.ts file to add Istio Control Plane to your cluster
elamaran11 marked this conversation as resolved.
Show resolved Hide resolved

```typescript
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import * as blueprints from '@aws-quickstart/eks-blueprints';

const app = new cdk.App();

const istioBase = new blueprints.addons.IstioBaseAddOn();
const istioControlPlane = new blueprints.addons.IstioControlPlaneAddOn()
const istioCni = new blueprints.addons.IstioCniAddOn()

const addOns: Array<blueprints.ClusterAddOn> = [ istioBase, istioControlPlane, istioCni ];

const blueprint = blueprints.EksBlueprint.builder()
.version("auto")
.addOns(...addOns)
.build(app, 'my-stack-name');
```

To validate that installation is successful run the following command:

```bash
$ kubectl get all -n istio-system
NAME READY STATUS RESTARTS AGE
pod/istio-cni-node-6w5fb 1/1 Running 0 4m25s
pod/istio-cni-node-nbwbn 1/1 Running 0 4m25s
pod/istiod-6c7b79d8cc-mwk4c 1/1 Running 0 4m43s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/istiod ClusterIP 172.20.237.63 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 4m43s

NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/istio-cni-node 2 2 2 2 2 kubernetes.io/os=linux 4m25s

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/istiod 1/1 1 1 4m43s

NAME DESIRED CURRENT READY AGE
replicaset.apps/istiod-6c7b79d8cc 1 1 1 4m43s

NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/istiod Deployment/istiod 0%/80% 1 5 1 4m43s
```

## Functionality

1. Installs Istio CNI plugin performs the Istio mesh pod traffic redirection in the Kubernetes pod lifecycle’s network setup.
61 changes: 61 additions & 0 deletions docs/addons/istio-ingress-gateway.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Istio Ingress Gateway Add-on

Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. An Ingress gateway is a load balancer that handles incoming HTTP and HTTPS traffic to the mesh. It can be used to expose services to the internet, or to enable communication between services within the mesh. Istio Ingress Gateway Add-on installs Istio Ingress Gateway implementing a Kubernetes gateway resource and a set of Envoy proxy instances.

***IMPORTANT***:

1. This add-on depends on [Istio Base](istio-base.md) and [istio Control Plane](istio-control-plane.md) Add-ons for cluster-wide resources and CRDs.

***Istio Base add-on and Istio Control Plane addon-on must be present in add-on array*** and ***must be in add-on array before the Istio Ingress Gateway add-on*** for it to work, as shown in below example. Otherwise will run into error `Assertion failed: Missing a dependency for IstioBaseAddOn`.

## Usage

Add the following as an add-on to your main.ts file to add Istio Control Plane to your cluster

```typescript
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import * as blueprints from '@aws-quickstart/eks-blueprints';

const app = new cdk.App();

const istioBase = new blueprints.addons.IstioBaseAddOn();
const istioControlPlane = new blueprints.addons.IstioControlPlaneAddOn()
const istioIngressGateway = new blueprints.addons.IstioIngressGatewayAddOn()

const addOns: Array<blueprints.ClusterAddOn> = [ istioBase, istioControlPlane, istioIngressGateway ];

const blueprint = blueprints.EksBlueprint.builder()
.version("auto")
.addOns(...addOns)
.build(app, 'my-stack-name');
```

To validate that installation is successful run the following command:

```bash
$ kubectl get all -n istio-system
NAME READY STATUS RESTARTS AGE
pod/ingressgateway-686c75b54c-qgmd4 1/1 Running 0 4m25s
pod/istiod-6c7b79d8cc-mwk4c 1/1 Running 0 4m43s

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/ingressgateway LoadBalancer 172.20.141.148 a2b87c2b0a6d64bfe9e99b29308ae0ad-449071982.us-east-1.elb.amazonaws.com 15021:30586/TCP,80:32662/TCP,443:30891/TCP 4m25s
service/istiod ClusterIP 172.20.237.63 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 4m43s

NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/ingressgateway 1/1 1 1 4m25s
deployment.apps/istiod 1/1 1 1 4m43s

NAME DESIRED CURRENT READY AGE
replicaset.apps/ingressgateway-686c75b54c 1 1 1 4m25s
replicaset.apps/istiod-6c7b79d8cc 1 1 1 4m43s

NAME REFERENCE TARGETS MINPODS MAXPODS REPLICAS AGE
horizontalpodautoscaler.autoscaling/ingressgateway Deployment/ingressgateway 2%/80% 1 5 1 4m25s
horizontalpodautoscaler.autoscaling/istiod Deployment/istiod 0%/80% 1 5 1 4m43s
```

## Functionality

1. Istio Ingress Gateway Add-on installs Istio Ingress Gateway implementing a Kubernetes gateway resource and a set of Envoy proxy instances.
2 changes: 2 additions & 0 deletions examples/blueprint-construct/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ export default class BlueprintConstruct {
// new blueprints.addons.CloudWatchInsights(),
new blueprints.addons.IstioBaseAddOn(),
new blueprints.addons.IstioControlPlaneAddOn(),
new blueprints.addons.IstioCniAddon(),
new blueprints.addons.IstioIngressGatewayAddon(),
new blueprints.addons.CalicoOperatorAddOn(),
new blueprints.addons.MetricsServerAddOn(),
new blueprints.addons.SecretsStoreAddOn(),
Expand Down
6 changes: 4 additions & 2 deletions lib/addons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ export * from './keda';
export * from './kubevious';
export * from './ebs-csi-driver';
export * from './efs-csi-driver';
export * from './istio-base';
export * from './istio-control-plane';
export * from './istio-addons/istio-base';
export * from './istio-addons/istio-control-plane';
export * from './istio-addons/istio-cni';
export * from './istio-addons/istio-ingress-gateway';
export * from './knative-operator';
export * from './jupyterhub';
export * from './emr-on-eks';
Expand Down
27 changes: 27 additions & 0 deletions lib/addons/istio-addons/istio-cni.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Construct } from 'constructs';
import { ClusterInfo } from "../../spi";
import { HelmAddOn, HelmAddOnProps } from "../helm-addon";
import { dependable, supportsALL } from '../../utils';

const defaultProps: HelmAddOnProps = {
name: 'istio-cni',
release: 'cni',
namespace: 'istio-system',
chart: 'cni',
version: "1.20.1",
elamaran11 marked this conversation as resolved.
Show resolved Hide resolved
repository: 'https://istio-release.storage.googleapis.com/charts',
values: {},
};

@supportsALL
export class IstioCniAddon extends HelmAddOn {

constructor() {
elamaran11 marked this conversation as resolved.
Show resolved Hide resolved
super({...defaultProps});
}
@dependable('IstioBaseAddOn','IstioControlPlaneAddOn')
elamaran11 marked this conversation as resolved.
Show resolved Hide resolved
deploy(clusterInfo: ClusterInfo): void | Promise<Construct> {
const chart = this.addHelmChart(clusterInfo, this.props.values);
return Promise.resolve(chart);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import merge from "ts-deepmerge";
import { ClusterInfo } from "../../spi";
import { HelmAddOn, HelmAddOnUserProps } from "../helm-addon";
import { dependable, supportsALL } from '../../utils';
import { ValuesSchema } from "./values";
import { ValuesSchema } from "./istio-control-plane-values";

export interface IstioControlPlaneAddOnProps extends HelmAddOnUserProps {
values?: ValuesSchema
Expand Down
27 changes: 27 additions & 0 deletions lib/addons/istio-addons/istio-ingress-gateway.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Construct } from 'constructs';
import { ClusterInfo } from "../../spi";
import { HelmAddOn, HelmAddOnProps } from "../helm-addon";
import { dependable, supportsALL } from '../../utils';

const defaultProps: HelmAddOnProps = {
name: 'istio-ingressgateway',
release: 'ingressgateway',
namespace: 'istio-system',
chart: 'gateway',
version: "1.20.1",
repository: 'https://istio-release.storage.googleapis.com/charts',
values: {},
};

@supportsALL
export class IstioIngressGatewayAddon extends HelmAddOn {
elamaran11 marked this conversation as resolved.
Show resolved Hide resolved

constructor() {
super({...defaultProps});
}
@dependable('IstioBaseAddOn','IstioControlPlaneAddOn')
deploy(clusterInfo: ClusterInfo): void | Promise<Construct> {
const chart = this.addHelmChart(clusterInfo, this.props.values);
return Promise.resolve(chart);
}
}
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ nav:
- IBM Instana: 'addons/instana-addon.md'
- Istio Base: 'addons/istio-base.md'
- Istio Control Plane: 'addons/istio-control-plane.md'
- Istio CNI: 'addons/istio-cni.md'
- Istio Ingress Gateway: 'addons/istio-ingress-gateway.md'
- JupyterHub: 'addons/jupyterhub.md'
- Karpenter: 'addons/karpenter.md'
- Kasten: 'addons/kasten-k10.md'
Expand Down
Loading