Skip to content

Commit

Permalink
[sample-topology] git from frinx/utilities image (#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
smartin-elisapolystar authored Aug 16, 2024
1 parent 1655a26 commit 9b06ae4
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 49 deletions.
6 changes: 3 additions & 3 deletions charts/sample-topology/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: sample-topology
description: A Helm chart for the Frinx Machine sample-topology Kubernetes deployment
icon: https://avatars.githubusercontent.com/u/23452093?s=200&v=4
type: application
version: 3.1.0
version: 3.1.1
appVersion: "6.1.0"
maintainers:
- name: FRINX
annotations:
artifacthub.io/changes: |
- kind: changed
description: Bump application version to 6.1
description: Git is now from custom utilities image
links:
- name: GitHub PR
url: https://github.com/FRINXio/helm-charts/pull/386
url: https://github.com/FRINXio/helm-charts/pull/409
85 changes: 44 additions & 41 deletions charts/sample-topology/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A Helm chart for the Frinx Machine sample-topology Kubernetes deployment

![Version: 3.1.1](https://img.shields.io/badge/Version-3.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 6.1.0](https://img.shields.io/badge/AppVersion-6.1.0-informational?style=flat-square)

## Get Repo Info

```console
Expand All @@ -27,45 +29,46 @@ helm upgrade [RELEASE_NAME] frinx/sample-topology
helm uninstall [RELEASE_NAME]
```

## Configuration
## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | [Affinity for pod assignment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| autoscaling | object | `{"enabled":false,"maxReplicas":100,"minReplicas":1,"targetCPUUtilizationPercentage":80}` | [Autoscaling parameters](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/) |
| devices | object | `{"create":true,"devicesSpecification":[{"device_name":"cisco_IOS","port":10005,"protocol":"cli"}]}` | Sample devices |
| env | object | `{"DOCKER_GWBRIDGE_IP":"localhost"}` | Application environment variables |
| externalConfig.auth.existingSecret | string | `nil` | |
| externalConfig.auth.password | string | `nil` | |
| externalConfig.auth.username | string | `nil` | |
| externalConfig.configRepository | string | `"github.com/FRINXio/sample-topology-private-config.git"` | Config repository |
| externalConfig.enabled | bool | `false` | External config enable |
| extraInitContainers | list | `[]` | Extra initContainers |
| fullnameOverride | string | `""` | String to fully override app name |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| image.repository | string | `"frinx/sample-topology"` | Sample-topology image repository |
| image.tag | string | `""` | |
| imagePullSecrets | list | `[]` | [Image Pull Secrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) |
| ingress.annotations | object | `{}` | Additional annotations for the Ingress resource |
| ingress.className | string | `""` | IngressClass that will be be used to implement the Ingress |
| ingress.enabled | bool | `false` | Enable ingress |
| ingress.hosts | list | `[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}]` | [Ingress Host](https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource) |
| ingress.labels | object | `{}` | Additional labels for the Ingress resource |
| ingress.tls | list | `[]` | [Ingress TLS resource](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls) |
| nameOverride | string | `""` | String to partially override app name |
| nodeSelector | object | `{}` | [Node labels for pod assignment](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/) |
| podAnnotations | object | `{}` | Pod annotations |
| podSecurityContext | object | `{}` | Configure [Pods Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod) |
| replicaCount | int | `1` | Number of replicas of the deployment |
| resources | object | `{}` | [Container resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/) |
| securityContext | object | `{}` | Configure [Container Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container) |
| service.type | string | `"ClusterIP"` | Service type |
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| tolerations | list | `[]` | [Tolerations for pod assignment](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) |
| utilitiesImage.pullPolicy | string | `"IfNotPresent"` | Image pull policy |
| utilitiesImage.repository | string | `"frinx/utilities-alpine"` | utilities image repository |
| utilitiesImage.tag | string | `"1.2"` | Overrides the image tag. |

| Parameter | Description | Default |
|-----------|-------------|---------|
| `replicaCount` | Number of nodes | `1` |
| `image.repository` | Image repository | `frinx/sample-topology` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.tag` | Image tag | `""` |
| `imagePullSecrets` | Image pull secrets | `[]` |
| `nameOverride` | Replaces the name of the chart in the Chart.yaml file | `""` |
| `fullnameOverride` | Completely replaces the generated name | `""` |
| `serviceAccount.create` | Create service account | `true` |
| `serviceAccount.annotations` | ServiceAccount annotations | `{}` |
| `serviceAccount.name` | Service account name to use, when empty will be set to created account if `serviceAccount.create` is set else to `default` | `""` |
| `podAnnotations` | Deployment | `{}` |
| `podSecurityContext` | Pod deployment securityContext | `{}` |
| `securityContext` | Deployment securityContext | `{}` |
| `service.type` | Kubernetes service type | `ClusterIP` |
| `ingress.enabled` | Enable [ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/). | `false` |
| `ingress.labels` | Ingress labels | `{}` |
| `ingress.annotations` | Annotations to be added to the ingress. | `{}` |
| `ingress.className` | Ingress [class name](https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-class). | `""` |
| `ingress.tls` | Enable or disable tls attribute in ingress | `false` |
| `ingress.hosts` | Ingress accepted hostname | `""` |
| `resources` | CPU/Memory resource requests/limits | `{}` |
| `autoscaling.enabled` | Enable replica autoscaling settings | `false` |
| `autoscaling.minReplicas` | Minimum replicas for the pod autoscaling | `1` |
| `autoscaling.maxReplicas` | Maximum replicas for the pod autoscaling | `100` |
| `autoscaling.targetCPUUtilizationPercentage` | Percentage of CPU to consider when autoscaling | `80` |
| `autoscaling.targetMemoryUtilizationPercentage` | Percentage of Memory to consider when autoscaling | |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Toleration labels for pod assignment | `[]` |
| `affinity` | Affinity settings for pod assignment | `{}` |
| `env.DOCKER_GWBRIDGE_IP` | DOCKER_GWBRIDGE_IP env value | `"localhost"` |
| `extraInitContainers` | Add extra init container into deployment | `[]` |
| `devices.create` | Create devices.csv files with list of simulated devices | `true` |
| `devices.devicesSpecification` | List of simulated devices. See [sample-topology documentation](https://github.com/FRINXio/sample-topology/blob/main/README.md) for more details | See [values.yaml](https://github.com/FRINXio/helm-charts/blob/main/charts/sample-topology/values.yaml) |
| `externalConfig.enabled` | Enable downloading of private config files from repository | `false` |
| `externalConfig.configRepository` | Repository with private config files | `github.com/FRINXio/sample-topology-private-config.git` |
| `externalConfig.auth.username` | Username for private repository | |
| `externalConfig.auth.password` | Password for private repository | |
| `externalConfig.auth.existingSecret` | Use external secret with username and password for private repository | |
----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)
35 changes: 35 additions & 0 deletions charts/sample-topology/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{ template "chart.header" . }}
{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

## Get Repo Info

```console
helm repo add frinx https://FRINXio.github.io/helm-charts
helm repo update
```

## Install Chart

```console
helm install [RELEASE_NAME] frinx/{{ template "chart.name" . }}
```

## Upgrading Chart

```console
helm upgrade [RELEASE_NAME] frinx/{{ template "chart.name" . }}
```

## Uninstall Chart

```console
helm uninstall [RELEASE_NAME]
```

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
5 changes: 3 additions & 2 deletions charts/sample-topology/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ spec:
- clone
- 'https://$(GIT_USERNAME):$(GIT_PASSWORD)@{{ .Values.externalConfig.configRepository }}'
- '/tmp/repo'
image: alpine/git:2.36.3
imagePullPolicy: IfNotPresent
# git from frinx/utilities-alpine
image: "{{ .Values.utilitiesImage.repository }}:{{ .Values.utilitiesImage.tag }}"
imagePullPolicy: "{{ .Values.utilitiesImage.pullPolicy }}"
env:
- name: GIT_USERNAME
valueFrom:
Expand Down
41 changes: 38 additions & 3 deletions charts/sample-topology/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,41 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- Number of replicas of the deployment
replicaCount: 1

image:
# -- Sample-topology image repository
repository: frinx/sample-topology
# -- Image pull policy
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""

# -- [Image Pull Secrets](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/)
imagePullSecrets: []
# -- String to partially override app name
nameOverride: ""
# -- String to fully override app name
fullnameOverride: ""

serviceAccount:
# Specifies whether a service account should be created
# -- Specifies whether a service account should be created
create: true
# Annotations to add to the service account
# -- Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# -- The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""

# -- Pod annotations
podAnnotations: {}

# -- Configure [Pods Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod)
podSecurityContext: {}
# fsGroup: 2000

# -- Configure [Container Security Context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container)
securityContext: {}
# capabilities:
# drop:
Expand All @@ -37,23 +46,32 @@ securityContext: {}
# runAsUser: 1000

service:
# -- Service type
type: ClusterIP

# Configure the [Ingress resource](https://kubernetes.io/docs/concepts/services-networking/ingress/)
ingress:
# -- Enable ingress
enabled: false
# -- IngressClass that will be be used to implement the Ingress
className: ""
# -- Additional labels for the Ingress resource
labels: {}
# -- Additional annotations for the Ingress resource
annotations: {}
# -- [Ingress Host](https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource)
hosts:
- host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
# -- [Ingress TLS resource](https://kubernetes.io/docs/concepts/services-networking/ingress/#tls)
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

# -- [Container resources](https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/)
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
Expand All @@ -66,24 +84,31 @@ resources: {}
# cpu: 100m
# memory: 128Mi

# -- [Autoscaling parameters](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

# -- [Node labels for pod assignment](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/)
nodeSelector: {}

# -- [Tolerations for pod assignment](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/)
tolerations: []

# -- [Affinity for pod assignment](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity)
affinity: {}

# -- Application environment variables
env:
DOCKER_GWBRIDGE_IP: "localhost"

# -- Extra initContainers
extraInitContainers: []

# -- Sample devices
devices:
create: true
devicesSpecification:
Expand Down Expand Up @@ -160,9 +185,19 @@ devices:
# count_of_devices: 1
# starting_port: 17200
externalConfig:
# -- External config enable
enabled: false
# -- Config repository
configRepository: github.com/FRINXio/sample-topology-private-config.git
auth:
username:
password:
existingSecret:

utilitiesImage:
# -- utilities image repository
repository: frinx/utilities-alpine
# -- Overrides the image tag.
tag: "1.2"
# -- Image pull policy
pullPolicy: IfNotPresent

0 comments on commit 9b06ae4

Please sign in to comment.