diff --git a/.gitignore b/.gitignore index 87622f56..edc97fc2 100644 --- a/.gitignore +++ b/.gitignore @@ -353,3 +353,6 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ + +# Chart-tgzs generated by dependency update +charts/osm-arc/charts diff --git a/Makefile b/Makefile index c4e3d3ef..6207ad30 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,9 @@ KIND_VERSION ?= 0.8.1 KUBERNETES_VERSION ?= v1.19.0 HELM_VERSION ?= 3.3.4 +package-osm-chart: + helm dependency update osm-arc + e2e-bootstrap: # Download and install kind curl -L https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-linux-amd64 --output ${GITHUB_WORKSPACE}/bin/kind && chmod +x ${GITHUB_WORKSPACE}/bin/kind @@ -23,7 +26,7 @@ e2e-helm-deploy: mkdir -p .staging/helm curl https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz > .staging/helm/helmbin.tar.gz cd .staging/helm && tar -xvf helmbin.tar.gz - ./.staging/helm/linux-amd64/helm install osm ./charts/osm --namespace arc-osm-system + ./.staging/helm/linux-amd64/helm install osm ./charts/osm-arc --namespace arc-osm-system --dependency-update test-e2e: bats -t test/bats/test.bats diff --git a/charts/osm/.helmignore b/charts/osm-arc/.helmignore similarity index 100% rename from charts/osm/.helmignore rename to charts/osm-arc/.helmignore diff --git a/charts/osm-arc/Chart.lock b/charts/osm-arc/Chart.lock new file mode 100644 index 00000000..53b4693a --- /dev/null +++ b/charts/osm-arc/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: osm + repository: https://openservicemesh.github.io/osm + version: 0.5.0 +digest: sha256:343d510c411a72e9abe9b9a740b0105c206271b813024917969ba0f7ecd4d8a6 +generated: "2020-11-13T13:54:31.7602449-05:00" diff --git a/charts/osm/Chart.yaml b/charts/osm-arc/Chart.yaml similarity index 59% rename from charts/osm/Chart.yaml rename to charts/osm-arc/Chart.yaml index f9cb8c19..254042fb 100644 --- a/charts/osm/Chart.yaml +++ b/charts/osm-arc/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: osm -description: A Helm chart to install the OSM control plane on Kubernetes +name: osm-arc +description: A Helm chart to install the OSM control plane on Azure Arc enabled Kubernetes clusters. # A chart can be either an 'application' or a 'library' chart. # @@ -14,8 +14,16 @@ 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. -version: 0.4.2 +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.5.0 # This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. -appVersion: v0.4.2 +# 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.5.0 + +dependencies: +- name: osm + version: "0.5.0" + repository: "https://openservicemesh.github.io/osm" + diff --git a/charts/osm/templates/osm-label.yml b/charts/osm-arc/templates/osm-label.yml similarity index 95% rename from charts/osm/templates/osm-label.yml rename to charts/osm-arc/templates/osm-label.yml index 11287a55..1828ebf7 100644 --- a/charts/osm/templates/osm-label.yml +++ b/charts/osm-arc/templates/osm-label.yml @@ -6,7 +6,7 @@ apiVersion: v1 kind: ServiceAccount metadata: name: osm-label-account - namespace: {{ .Values.OpenServiceMesh.namespace }} + namespace: {{ .Release.Namespace }} annotations: "helm.sh/hook-weight": "20" "helm.sh/hook": pre-install @@ -37,7 +37,7 @@ metadata: subjects: - kind: ServiceAccount name: osm-label-account - namespace: {{ .Values.OpenServiceMesh.namespace }} + namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole name: osm-label-cluster-role @@ -55,7 +55,7 @@ metadata: subjects: - kind: ServiceAccount name: osm-label-account - namespace: {{ .Values.OpenServiceMesh.namespace }} + namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole name: osm-label-cluster-role @@ -73,7 +73,7 @@ metadata: subjects: - kind: ServiceAccount name: osm-label-account - namespace: {{ .Values.OpenServiceMesh.namespace }} + namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole name: osm-label-cluster-role @@ -83,7 +83,7 @@ apiVersion: batch/v1 kind: Job metadata: name: osm-label - namespace: {{ .Values.OpenServiceMesh.namespace }} + namespace: {{ .Release.Namespace }} annotations: "helm.sh/hook-weight": "35" "helm.sh/hook": pre-install @@ -109,7 +109,7 @@ spec: - name: labelnamespaces value: {{ .Values.OpenServiceMesh.ignoreNamespaces }} - name: osmnamespace - value: {{ .Values.OpenServiceMesh.namespace }} + value: {{ .Release.Namespace }} securityContext: allowPrivilegeEscalation: false command: diff --git a/charts/osm-arc/values.yaml b/charts/osm-arc/values.yaml new file mode 100644 index 00000000..7e5b90b6 --- /dev/null +++ b/charts/osm-arc/values.yaml @@ -0,0 +1,27 @@ +# Default values for osm-arc. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +OpenServiceMesh: + ignoreNamespaces: "kube-system azure-arc arc-osm-system" + +osm: + OpenServiceMesh: + enableDebugServer: true + enablePermissiveTrafficPolicy: true + enableFluentbit: true + image: + registry: mcr.microsoft.com/oss/openservicemesh + fluentBitImage: + name: fluentbit-logger + registry: "mcr.microsoft.com/oss/fluent" + tag: "v1.6.2" + pullPolicy: IfNotPresent + enforceSingleMesh: true + enablePrometheus: false + deployJaeger: false + sidecarImage: mcr.microsoft.com/oss/envoyproxy/envoy:v1.15.0 + +alpine: + image: + name: "mcr.microsoft.com/azure-policy/alpine" + tag: "prod_20200505.1" diff --git a/charts/osm/README.md b/charts/osm/README.md deleted file mode 100644 index 77e39a06..00000000 --- a/charts/osm/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# osm - -![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.3.0](https://img.shields.io/badge/AppVersion-v0.3.0-informational?style=flat-square) - -A Helm chart to install the OSM control plane on Kubernetes - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| OpenServiceMesh.caBundleSecretName | string | `"osm-ca-bundle"` | | -| OpenServiceMesh.certficateManager | string | `"tresor"` | | -| OpenServiceMesh.certmanager.issuerGroup | string | `"cert-manager"` | | -| OpenServiceMesh.certmanager.issuerKind | string | `"Issuer"` | | -| OpenServiceMesh.certmanager.issuerName | string | `"osm-ca"` | | -| OpenServiceMesh.deployJaeger | bool | `true` | | -| OpenServiceMesh.enableBackpressureExperimental | bool | `false` | | -| OpenServiceMesh.enableDebugServer | bool | `false` | | -| OpenServiceMesh.enableEgress | bool | `false` | | -| OpenServiceMesh.enableGrafana | bool | `false` | | -| OpenServiceMesh.enablePrometheus | bool | `true` | | -| OpenServiceMesh.enablePermissiveTrafficPolicy | bool | `false` | | -| OpenServiceMesh.envoyLogLevel | string | `"error"` | | -| OpenServiceMesh.grafana.port | int | `3000` | | -| OpenServiceMesh.image.pullPolicy | string | `"IfNotPresent"` | | -| OpenServiceMesh.image.registry | string | `"openservicemesh"` | | -| OpenServiceMesh.image.tag | string | `"v0.3.0"` | | -| OpenServiceMesh.imagePullSecrets | object | `{}` | | -| OpenServiceMesh.meshCIDRRanges | string | `"0.0.0.0/0"` | | -| OpenServiceMesh.meshName | string | `"osm"` | | -| OpenServiceMesh.prometheus.port | int | `7070` | | -| OpenServiceMesh.prometheus.retention.time | string | `"15d"` | | -| OpenServiceMesh.replicaCount | int | `1` | | -| OpenServiceMesh.serviceCertValidityMinutes | int | `1` | | -| OpenServiceMesh.sidecarImage | string | `"envoyproxy/envoy-alpine:v1.15.0"` | | -| OpenServiceMesh.useHTTPSIngress | bool | `false` | | -| OpenServiceMesh.vault.host | string | `nil` | | -| OpenServiceMesh.vault.protocol | string | `"http"` | | -| OpenServiceMesh.vault.role | string | `"openservicemesh"` | | -| OpenServiceMesh.vault.token | string | `nil` | | -| OpenServiceMesh.tracing.address | string | `"jaeger.osm-system.svc.cluster.local"` | | -| OpenServiceMesh.tracing.enable | bool | `false` | | -| OpenServiceMesh.tracing.endpoint | string | `"/api/v2/spans"` | | -| OpenServiceMesh.tracing.port | int | `9411` | | diff --git a/charts/osm/crds/access.yaml b/charts/osm/crds/access.yaml deleted file mode 100644 index 20af9615..00000000 --- a/charts/osm/crds/access.yaml +++ /dev/null @@ -1,90 +0,0 @@ ---- -# TrafficTarget v1alpha2 -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: traffictargets.access.smi-spec.io -spec: - group: access.smi-spec.io - scope: Namespaced - names: - kind: TrafficTarget - shortNames: - - tt - plural: traffictargets - singular: traffictarget - version: v1alpha2 - versions: - - name: v1alpha2 - served: true - storage: true - - name: v1alpha1 - served: false - storage: false - validation: - openAPIV3Schema: - properties: - spec: - required: - - destination - properties: - destination: - description: The destination of this traffic target. - type: object - required: - - name - - kind - properties: - kind: - description: Kind of the destination. - type: string - name: - description: Name of the destination. - type: string - namespace: - description: Namespace of the destination. - type: string - port: - description: Port number of the destination. - type: number - rules: - description: Specifications of this traffic target. - type: array - items: - type: object - required: - - name - - kind - properties: - kind: - description: Kind of this spec. - type: string - enum: - - HTTPRouteGroup - - TCPRoute - name: - description: Name of this spec. - type: string - matches: - description: Match conditions of this spec. - type: array - items: - type: string - sources: - description: Sources of this traffic target. - type: array - items: - type: object - required: - - name - - kind - properties: - kind: - description: Kind of this source. - type: string - name: - description: Name of this source. - type: string - namespace: - description: Namespace of this source. - type: string diff --git a/charts/osm/crds/specs.yaml b/charts/osm/crds/specs.yaml deleted file mode 100644 index 4a16545a..00000000 --- a/charts/osm/crds/specs.yaml +++ /dev/null @@ -1,96 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: httproutegroups.specs.smi-spec.io -spec: - group: specs.smi-spec.io - scope: Namespaced - names: - kind: HTTPRouteGroup - shortNames: - - htr - plural: httproutegroups - singular: httproutegroup - version: v1alpha3 - versions: - - name: v1alpha3 - served: true - storage: true - - name: v1alpha2 - served: false - storage: false - - name: v1alpha1 - served: false - storage: false - validation: - openAPIV3Schema: - properties: - spec: - required: - - matches - properties: - matches: - description: Match conditions of this route group. - type: array - items: - type: object - required: - - name - properties: - name: - description: Name of the HTTP route. - type: string - pathRegex: - description: URI path regex of the HTTP route. - type: string - methods: - description: The HTTP methods of this HTTP route. - type: array - items: - type: string - description: The HTTP method of this HTTP route. - enum: - - '*' - - GET - - HEAD - - PUT - - POST - - DELETE - - CONNECT - - OPTIONS - - TRACE - - PATCH - headers: - description: Header match conditions of this route. - type: array - items: - description: Header match condition of this route. - type: object - additionalProperties: - type: string ---- -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: tcproutes.specs.smi-spec.io -spec: - group: specs.smi-spec.io - scope: Namespaced - names: - kind: TCPRoute - shortNames: - - tr - plural: tcproutes - singular: tcproute - version: v1alpha3 - versions: - - name: v1alpha3 - served: true - storage: true - - name: v1alpha2 - served: false - storage: false - - name: v1alpha1 - served: false - storage: false diff --git a/charts/osm/crds/split.yaml b/charts/osm/crds/split.yaml deleted file mode 100644 index 1d499bac..00000000 --- a/charts/osm/crds/split.yaml +++ /dev/null @@ -1,49 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: trafficsplits.split.smi-spec.io -spec: - group: split.smi-spec.io - version: v1alpha2 - scope: Namespaced - names: - kind: TrafficSplit - listKind: TrafficSplitList - shortNames: - - ts - plural: trafficsplits - singular: trafficsplit - versions: - - name: v1alpha2 - served: true - storage: true - additionalPrinterColumns: - - name: Service - type: string - description: The apex service of this split. - JSONPath: .spec.service - validation: - openAPIV3Schema: - properties: - spec: - type: object - required: - - service - - backends - properties: - service: - description: The apex service of this split. - type: string - backends: - description: The backend services of this split. - type: array - items: - type: object - required: ['service', 'weight'] - properties: - service: - description: Name of the Kubernetes service. - type: string - weight: - description: Traffic weight value of this backend. - type: number diff --git a/charts/osm/templates/NOTES.txt b/charts/osm/templates/NOTES.txt deleted file mode 100644 index 0bac9575..00000000 --- a/charts/osm/templates/NOTES.txt +++ /dev/null @@ -1 +0,0 @@ -Congratulations! The OSM control plane has been installed in your Kubernetes cluster! diff --git a/charts/osm/templates/_helpers.tpl b/charts/osm/templates/_helpers.tpl deleted file mode 100644 index 289f4e17..00000000 --- a/charts/osm/templates/_helpers.tpl +++ /dev/null @@ -1,63 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "osm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "osm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "osm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "osm.labels" -}} -helm.sh/chart: {{ include "osm.chart" . }} -{{ include "osm.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "osm.selectorLabels" -}} -app.kubernetes.io/name: {{ include "osm.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "osm.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "osm.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/osm/templates/fluentbit-configmap.yml b/charts/osm/templates/fluentbit-configmap.yml deleted file mode 100644 index 1e6d0a0c..00000000 --- a/charts/osm/templates/fluentbit-configmap.yml +++ /dev/null @@ -1,36 +0,0 @@ -{{- if .Values.OpenServiceMesh.enableFluentbit }} -apiVersion: v1 -kind: ConfigMap -metadata: - name: fluentbit-configmap - namespace: {{.Values.OpenServiceMesh.namespace}} -data: - fluent-bit.conf: |- - [SERVICE] - Flush 5 - Daemon off - Log_Level info - Parsers_File parser.conf - [INPUT] - Name tail - Tag kube.* - Path /var/log/containers/osm-controller-*_{{.Values.OpenServiceMesh.namespace}}_osm-controller-*.log - Parser cri - [FILTER] - name grep - match * - regex message /"level":"error"/ - [OUTPUT] - Name azure - Match * - Customer_ID 49a4d43a-81ef-4607-83f6-a13872c6ae60 - Shared_Key 5q+pyUKQtxtef8ZGTb+aYYcFWR54lmtXpA0AYWJSqUOGBRd9AHgDZZmb0uuLpjOjIMZTp+F3F4e5JUMOWUmHHw== - parser.conf: |- - [PARSER] - # http://rubular.com/r/tjUt3Awgg4 - Name cri - Format regex - Regex ^(?