Skip to content

Commit

Permalink
Update-2021-03-04_15:27:43
Browse files Browse the repository at this point in the history
  • Loading branch information
pogossian committed Mar 4, 2021
1 parent e1280d3 commit fd7120d
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/netris-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.4
version: 0.2.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: v0.3.2
appVersion: v0.3.3
home: https://github.com/netrisai/netris-operator
icon: https://www.netris.ai/wp-content/uploads/2020/05/logo-600.png # [todo] Change url to permalink
keywords:
Expand Down
111 changes: 111 additions & 0 deletions charts/netris-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Netris-Operator

Netris-operator runs within your Kubernetes cluster as a deployment resource. It utilizes CustomResourceDefinitions to configure netris cloud resources.

## Prerequisites

- Kubernetes 1.16+
- Helm 3.1+

## Installing the Chart

In order to install the Helm chart, you must follow these steps:

Create the namespace for netris-operator:

```
kubectl create namespace netris-operator
```

Add the Netris Helm repository:

```
helm repo add netrisai https://netrisai.github.io/charts
```

Update your local Helm chart repository cache:

```
helm repo update
```

### Option 1: Creds from secret

1) Create credentials secret for netris-operator:

```
kubectl -n netris-operator create secret generic netris-creds \
--from-literal=host="http://example.com" \
--from-literal=login="login" --from-literal=password="pass"
```

2) Install helm chart

```
helm install netris-operator netrisai/netris-operator \
--namespace netris-operator
```

### Option 2: Creds from helm values

1) Install helm chart with netris controller creds

```
helm install netris-operator netrisai/netris-operator \
--namespace netris-operator \
--set controller.host="http://example.com" \
--set controller.login="login" \
--set controller.password="pass"
```

## Uninstalling the Chart

To uninstall/delete the `netris-operator` helm release:

```
helm uninstall netris-operator
```

## Configuration

The following table lists the configurable parameters of the netris-operator chart and their default values.

### Common parameters

| Parameter | Description | Default |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------- |
| `nameOverride` | String to partially override common.names.fullname template with a string (will prepend the release name) | `nil` |
| `fullnameOverride` | String to fully override common.names.fullname template with a string | `nil` |
| `rbac.create` | Specify if an rbac authorization should be created with the necessarry Rolebindings | `true` |
| `serviceAccount.create` | Create a serviceAccount for the deployment | `true` |
| `serviceAccount.name` | Use the serviceAccount with the specified name | `""` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `podAnnotations` | Pod annotations | `{}` |
| `podSecurityContext` | Pod Security Context | `{}` |
| `securityContext` | Containers security context | `{}` |
| `service.type` | kube-rbac-proxy Service type | `ClusterIP` |
| `service.port` | kube-rbac-proxy Service port | `8443` |
| `resources` | CPU/memory resource requests/limits | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Node tolerations for pod assignment | `[]` |
| `affinity` | Node affinity for pod assignment | `{}` |

### Netris-Operator parameters
| Parameter | Description | Default |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------- | -------------------------- |
| `imagePullSecrets` | Reference to one or more secrets to be used when pulling images | `[]` |
| `image.repository` | Image repository | `netrisai/netris-operator` |
| `image.tag` | Image tag. Overrides the image tag whose default is the chart appVersion | `""` |
| `image.pullPolicy` | Image pull policy | `Always` |
| `controller.host` | Netris controller host url (`http://example.com`) | `""` |
| `controller.login` | Netris controller login | `""` |
| `controller.password` | Netris controller password | `""` |
| `controller.insecure` | Allow insecure server connections when using SSL | `false` |
| `controllerCreds.host.secretName` | Name of existing secret to use for Netris controller host. Ignored if `controller.host` is set | `netris-creds` |
| `controllerCreds.host.key` | Netris controller host key in existing secret. Ignored if `controller.host` is set | `host` |
| `controllerCreds.login.secretName` | Name of existing secret to use for Netris controller login. Ignored if `controller.login` is set | `netris-creds` |
| `controllerCreds.login.key` | Netris controller login key in existing secret. Ignored if `controller.login` is set | `login` |
| `controllerCreds.password.secretName` | Name of existing secret to use for Netris controller password. Ignored if `controller.password` is set | `netris-creds` |
| `controllerCreds.password.key` | Netris controller password key in existing secret. Ignored if `controller.password` is set | `password` |
| `logLevel` | Log level of netris-operator. Allowed values: `info` or `debug` | `info` |
| `requeueInterval` | Requeue interval in seconds for the netris-operator | `15` |
52 changes: 52 additions & 0 deletions charts/netris-operator/crds/k8s.netris.ai_vnets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,33 @@ metadata:
creationTimestamp: null
name: vnets.k8s.netris.ai
spec:
additionalPrinterColumns:
- JSONPath: .status.state
name: State
type: string
- JSONPath: .status.gateways
name: Gateways
type: string
- JSONPath: .status.sites
name: Sites
type: string
- JSONPath: .metadata.managedFields[0].time
name: Modified
priority: 1
type: date
- JSONPath: .spec.ownerTenant
name: Owner
type: string
- JSONPath: .spec.guestTenants
name: Guest Tenants
priority: 1
type: string
- JSONPath: .status.status
name: Status
type: string
- JSONPath: .metadata.creationTimestamp
name: Age
type: date
group: k8s.netris.ai
names:
kind: VNet
Expand Down Expand Up @@ -48,6 +75,8 @@ spec:
properties:
gateways:
items:
description: VNetGateway .
pattern: (^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/([0-9]|[12]\d|3[0-2]))?$)|(^((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?(\/([1-9]|[1-5][0-9]|6[0-4]))?$)
type: string
type: array
name:
Expand All @@ -57,10 +86,13 @@ spec:
description: VNetSwitchPort .
properties:
name:
pattern: ^[a-zA-Z0-9]+@[a-zA-Z0-9-]+$
type: string
state:
type: string
vlanId:
maximum: 4094
minimum: 2
type: integer
required:
- name
Expand All @@ -71,12 +103,32 @@ spec:
type: object
type: array
state:
enum:
- active
- disabled
type: string
required:
- guestTenants
- ownerTenant
- sites
type: object
status:
description: VNetStatus defines the observed state of VNet
properties:
gateways:
type: string
message:
type: string
sites:
type: string
state:
type: string
status:
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
of cluster Important: Run "make" to regenerate code after modifying
this file'
type: string
type: object
required:
- spec
type: object
Expand Down

0 comments on commit fd7120d

Please sign in to comment.