forked from openservicemesh/osm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
injector: split sidecar-injector from osm-controller
This change splits the sidecar injector component from osm-controller for scalability purpose as a part of openservicemesh#1939. Summary of changes: - injector is moved to a separate osm-injector app - Helm chart changes to deploy osm-injector - osm-controller changes to remove injector initialization - utility method on `providers.Config` to watch CA bundle secret - Makefile, dockerfile changes to build osm-injector - cleanup of unused options for mutating webhook's reconciler - update e2e tests to wait on osm-injector pod Signed-off-by: Shashank Ram <shashr2204@gmail.com>
- Loading branch information
1 parent
7930ef0
commit a78d2d4
Showing
29 changed files
with
495 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: osm-injector | ||
namespace: {{ include "osm.namespace" . }} | ||
labels: | ||
app: osm-injector | ||
meshName: {{ .Values.OpenServiceMesh.meshName }} | ||
spec: | ||
replicas: {{ .Values.OpenServiceMesh.injector.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app: osm-injector | ||
template: | ||
metadata: | ||
labels: | ||
app: osm-injector | ||
annotations: | ||
prometheus.io/scrape: 'true' | ||
prometheus.io/port: '9091' | ||
spec: | ||
serviceAccountName: {{ .Release.Name }} | ||
containers: | ||
- name: osm-injector | ||
image: "{{ .Values.OpenServiceMesh.image.registry }}/osm-injector:{{ .Values.OpenServiceMesh.image.tag }}" | ||
imagePullPolicy: {{ .Values.OpenServiceMesh.image.pullPolicy }} | ||
ports: | ||
- name: "sidecar-inject" | ||
containerPort: 9090 | ||
- name: "metrics" | ||
containerPort: 9091 | ||
command: ['/osm-injector'] | ||
args: [ | ||
"--verbosity", "{{.Values.OpenServiceMesh.controllerLogLevel}}", | ||
"--osm-namespace", "{{ include "osm.namespace" . }}", | ||
"--mesh-name", "{{.Values.OpenServiceMesh.meshName}}", | ||
"--init-container-image", "{{.Values.OpenServiceMesh.image.registry}}/init:{{ .Values.OpenServiceMesh.image.tag }}", | ||
"--sidecar-image", "{{.Values.OpenServiceMesh.sidecarImage}}", | ||
"--webhook-config-name", "{{.Values.OpenServiceMesh.webhookConfigNamePrefix}}-{{.Values.OpenServiceMesh.meshName}}", | ||
"--ca-bundle-secret-name", "{{.Values.OpenServiceMesh.caBundleSecretName}}", | ||
"--certificate-manager", "{{.Values.OpenServiceMesh.certificateManager}}", | ||
{{ if eq .Values.OpenServiceMesh.certificateManager "vault" }} | ||
"--vault-host", "{{.Values.OpenServiceMesh.vault.host}}", | ||
"--vault-protocol", "{{.Values.OpenServiceMesh.vault.protocol}}", | ||
"--vault-token", "{{.Values.OpenServiceMesh.vault.token}}", | ||
{{- end }} | ||
"--cert-manager-issuer-name", "{{.Values.OpenServiceMesh.certmanager.issuerName}}", | ||
"--cert-manager-issuer-kind", "{{.Values.OpenServiceMesh.certmanager.issuerKind}}", | ||
"--cert-manager-issuer-group", "{{.Values.OpenServiceMesh.certmanager.issuerGroup}}", | ||
] | ||
resources: | ||
limits: | ||
cpu: "{{.Values.OpenServiceMesh.injector.resource.limits.cpu}}" | ||
memory: "{{.Values.OpenServiceMesh.injector.resource.limits.memory}}" | ||
requests: | ||
cpu: "{{.Values.OpenServiceMesh.injector.resource.requests.cpu}}" | ||
memory: "{{.Values.OpenServiceMesh.injector.resource.requests.memory}}" | ||
readinessProbe: | ||
initialDelaySeconds: 1 | ||
timeoutSeconds: 5 | ||
httpGet: | ||
scheme: HTTPS | ||
path: /healthz | ||
port: 9090 | ||
livenessProbe: | ||
initialDelaySeconds: 1 | ||
timeoutSeconds: 5 | ||
httpGet: | ||
scheme: HTTPS | ||
path: /healthz | ||
port: 9090 | ||
env: | ||
# The INJECTOR_POD_NAME env variable sets pod name dynamically, used by osm-injector to register events | ||
- name: INJECTOR_POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
{{- if .Values.OpenServiceMesh.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{ toYaml .Values.OpenServiceMesh.imagePullSecrets | indent 8 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: osm-injector | ||
namespace: {{ include "osm.namespace" . }} | ||
labels: | ||
app: osm-injector | ||
spec: | ||
ports: | ||
- name: sidecar-inject | ||
port: 9090 | ||
selector: | ||
app: osm-injector |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.