Skip to content

Commit dcba4d7

Browse files
author
Ignacy Osetek
committed
Move AWI-GRPC-Catalyst-SDWAN with operator to kube-awi
This change moves the charts responsible for deploying AWI-GRPC-Catalyst-SDWAN controller and the k8s operator to the kube-awi repository. This repository, embeds the charts from kube-awi creating an addition to the operator setup with a visibility provided by awi-infra-guard service, the UI service that uses this visibility mode and envoy-proxy that proxies requests for UI and backend services and allows CLI to handle both AWI-GRPC-Catalyst-SDWAN and awi-infra-guard requests.
1 parent e60480b commit dcba4d7

10 files changed

Lines changed: 39 additions & 292 deletions

Makefile

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,4 @@
1-
LOCALBIN ?= $(shell pwd)/bin
2-
$(LOCALBIN):
3-
mkdir -p $(LOCALBIN)
4-
5-
KUBEBIN ?= $(shell pwd)/kube-awi/bin
6-
HELMIFY ?= $(LOCALBIN)/helmify
7-
KUSTOMIZE ?= $(KUBEBIN)/kustomize
8-
91
.PHONY: init-submodules
102
init-submodules:
113
git submodule update --init --recursive
124

13-
.PHONY: helmify
14-
helmify: $(HELMIFY) ## Download helmify locally if necessary.
15-
$(HELMIFY): $(LOCALBIN)
16-
test -s $(LOCALBIN)/helmify || GOBIN=$(LOCALBIN) go install github.com/arttor/helmify/cmd/helmify@v0.4.11
17-
18-
.PHONY: build-operator-chart
19-
build-operator-chart: helmify
20-
$(MAKE) -C kube-awi manifests kustomize
21-
$(KUSTOMIZE) build kube-awi/config/default | $(HELMIFY) awi-operator

README.md

Lines changed: 14 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -90,91 +90,17 @@ named as described below.
9090

9191
### Catalyst SDWAN Credentials
9292

93-
Needed when App Net Interface uses Catalyst SDWAN as a connector
93+
The AWI application requires the same secrets as one described in
94+
[this README](kube-awi/README.md).
9495

95-
```yaml
96-
apiVersion: v1
97-
kind: Secret
98-
metadata:
99-
name: catalyst-sdwan-credentials
100-
type: Opaque
101-
data:
102-
username: "{CATALYST_SDWAN_USERNAME}"
103-
password: "{CATALYST_SDWAN_PASSWORD}"
104-
```
105-
106-
### Provider specific credentials
107-
108-
If the App Net Interface connector is set to AWI, the administrator
109-
needs to provide secrets required for using AWS/GCP providers.
110-
111-
The AWS secret currently expects base64 encoded `credentials` file
112-
such as `$HOME/.aws/credentials`:
113-
114-
```ini
115-
[default]
116-
aws_access_key_id = KEY
117-
aws_secret_access_key = VALUE
118-
```
119-
120-
and such base64 encoded file should be placed inside a following secret:
121-
122-
```yaml
123-
apiVersion: v1
124-
kind: Secret
125-
metadata:
126-
name: aws-credentials
127-
type: Opaque
128-
data:
129-
credentials: "{FILE_ENCODED}"
130-
```
131-
132-
Similarly, GCP credentials also require base64 encoded file, which can be
133-
found under `$HOME/.config/gcloud`. The example file content:
134-
135-
**Service Account is required.**
136-
137-
```json
138-
{
139-
"client_email": "CLIENT_EMAIL",
140-
"client_id": "CLIENT_ID",
141-
"private_key": "PRIVATE_KEY",
142-
"private_key_id": "PRIVATE_KEY_ID",
143-
"token_uri": "TOKEN_URI",
144-
"type": "service_account"
145-
}
146-
```
147-
148-
And such base64 encoded file should be put in following secret:
149-
150-
```yaml
151-
apiVersion: v1
152-
kind: Secret
153-
metadata:
154-
name: gcp-credentials
155-
type: Opaque
156-
data:
157-
gcp-key.json: "{FILE_ENCODED}"
158-
```
159-
160-
### Cluster Context
161-
162-
If the administrator wants App Net Interface to be able to interact with
163-
k8s cluster (discovery process or creating connections to pods) the kubeconfig
164-
file needs to be provided as a secret (base64 encoded):
165-
166-
```yaml
167-
apiVersion: v1
168-
kind: Secret
169-
metadata:
170-
name: kube-config
171-
type: Opaque
172-
data:
173-
config: "{FILE_ENCODED}"
174-
```
96+
If the domain connector is set to AWI, the Catalyst SDWAN Controller
97+
credentials may be left empty, but provider specific credentials are
98+
necessary.
17599

176100
### UI Credentials
177101

102+
Installing AWI introduces another set of credentials for AWI-UI.
103+
178104
Currently, UI credentials are completely optional even if UI
179105
is spawned. The UI expects:
180106

@@ -246,58 +172,17 @@ helm install awi . --namespace awi-system
246172

247173
The AWI project consists of two charts:
248174

249-
1. main chart - the chart containing manifests for most of AWI components that include:
250-
251-
* AWI GRPC Catalyst Sdwan - the main operational controller
252-
* AWI Infra Guard - component responsible for setting connections using AWI connector
253-
* AWI UI - the front-end for the application
254-
* Envoy Proxy - a proxy image for forwarding requests to proper targets and handling
255-
WebGRPC protocol used by the UI
256-
257-
1. operator chart - the second chart responsible for kube-awi component that allows
258-
spawning k8s operator and necessary CRDs
259-
260-
## Building
261-
262-
Creating a new `main chart` simply requires updating templates, `Chart.yaml` and `values.yaml`
263-
according to your needs, however `operator chart` involves a few different steps.
264-
265-
### Operator Chart
266-
267-
The `operator chart` is built automatically from the `kube-awi` repository using `helmify`
268-
tool. If the kube-awi repository did not change, there should be no need in rebuilding
269-
operator chart.
270-
271-
If the operator chart needs to be refreshed:
175+
1. operator chart - the chart used for deploying `kube-awi` chart which spawns AWI
176+
Catalyst SDWAN Controller along with the k8s operator
272177

273-
1. Initialize submodules to download kube-awi repository
178+
1. awi chart - the chart containing manifests for additional components, namely:
274179

275-
```
276-
make init-submodules
277-
```
180+
* AWI Infra Guard - component responsible for visibility, required by CLI and UI
278181

279-
1. Ensure kube-awi is recent
280-
281-
```
282-
cd kube-awi
283-
git checkout main
284-
git pull origin main
285-
cd ..
286-
```
287-
288-
1. Make sure kube-awi is kustomized accodringly to the project needs. If not, enter
289-
kube-awi directory, kustomize it and optionally commit changes.
290-
291-
The project's production kustomize configuration should be commited so this step
292-
is mostly for building custom charts.
293-
294-
1. Generate chart
295-
296-
```
297-
make build-operator-graph
298-
```
182+
* AWI UI - the front-end for the application
299183

300-
1. Update `main chart` Chart.yaml with a new dependency version of your operator chart
184+
* Envoy Proxy - a proxy image for forwarding requests to proper targets and handling
185+
WebGRPC protocol used by the UI
301186

302187
# Contributing
303188

helm/Chart.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
dependencies:
2-
- name: awi-operator
3-
repository: file://../awi-operator
2+
- name: Catalyst-SDWAN-AWI-Plugin
3+
repository: file://../kube-awi/chart
44
version: 0.1.0
5-
digest: sha256:21a913979011049b01df10cd8750fcf9f8296d0c1421018beb3821be89658132
6-
generated: "2024-04-08T19:06:52.226409283+02:00"
5+
digest: sha256:a7e81d7ae2bd46c1ea124b0d3addd5621baebefe78cea08b2d1a3fd6a8fbb141
6+
generated: "2024-04-18T14:51:33.633642028+02:00"

helm/Chart.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
apiVersion: v2
2-
name: Catalyst-SDWAN-AWI-Plugin
2+
name: awi
33
description: A Helm chart for App Net Interface project
44
version: 0.1.0
55
appVersion: "0.1"
66
dependencies:
7-
- name: awi-operator
7+
- name: Catalyst-SDWAN-AWI-Plugin
88
version: 0.1.0
9-
repository: "file://../awi-operator"
10-
condition: components.kubeAWI
9+
repository: "file://../kube-awi/chart"
11.3 KB
Binary file not shown.

helm/charts/awi-operator-0.1.0.tgz

-5.77 KB
Binary file not shown.

helm/templates/awi-grpc-catalyst-sdwan.yaml

Lines changed: 0 additions & 102 deletions
This file was deleted.

helm/templates/envoy-proxy.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: envoy-proxy-config
4+
name: awi-envoy-proxy-config
55
data:
66
envoy.yaml: |
77
admin:
@@ -142,7 +142,7 @@ data:
142142
address:
143143
socket_address:
144144
address: awi-grpc-catalyst-sdwan
145-
port_value: {{ .Values.configs.awiGrpcCatalystSdwan.port }}
145+
port_value: {{ index .Values "Catalyst-SDWAN-AWI-Plugin" "config" "port" }}
146146
- name: awi_infra_guard_cluster
147147
connect_timeout: 0.25s
148148
type: logical_dns
@@ -163,16 +163,16 @@ data:
163163
apiVersion: apps/v1
164164
kind: Deployment
165165
metadata:
166-
name: envoy-proxy
166+
name: awi-envoy-proxy
167167
spec:
168168
replicas: 1
169169
selector:
170170
matchLabels:
171-
app: envoy-proxy
171+
app: awi-envoy-proxy
172172
template:
173173
metadata:
174174
labels:
175-
app: envoy-proxy
175+
app: awi-envoy-proxy
176176
spec:
177177
containers:
178178
- name: envoy-proxy
@@ -183,7 +183,7 @@ spec:
183183
volumes:
184184
- name: config-volume
185185
configMap:
186-
name: envoy-proxy-config
186+
name: awi-envoy-proxy-config
187187
items:
188188
- key: envoy.yaml
189189
path: envoy.yaml
@@ -193,11 +193,11 @@ spec:
193193
apiVersion: v1
194194
kind: Service
195195
metadata:
196-
name: envoy-proxy
196+
name: awi-envoy-proxy
197197
spec:
198198
type: LoadBalancer
199199
selector:
200-
app: envoy-proxy
200+
app: awi-envoy-proxy
201201
ports:
202202
- name: envoy-proxy-front
203203
protocol: TCP

0 commit comments

Comments
 (0)