-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add spire-controller-manager resources, update spire-server statefulset
Signed-off-by: Batuhan Apaydın <[email protected]>
- Loading branch information
1 parent
ab3e9fc
commit 8ae020a
Showing
16 changed files
with
260 additions
and
10 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
32 changes: 32 additions & 0 deletions
32
charts/spire/templates/spire-controller-manager-configmap.yaml
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,32 @@ | ||
{{- if .Values.controllerManager.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "spire.fullname" . }}-controller-manager-config | ||
namespace: {{ .Release.Namespace }} | ||
data: | ||
spire-controller-manager-config.yaml: | | ||
apiVersion: spire.spiffe.io/v1alpha1 | ||
kind: ControllerManagerConfig | ||
metadata: | ||
name: {{ include "spire.fullname" . }}-controller-manager-config | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "spire.server.labels" . | nindent 4 }} | ||
metrics: | ||
bindAddress: 127.0.0.1:8082 | ||
healthProbe: | ||
bindAddress: 127.0.0.1:8083 | ||
leaderElection: | ||
leaderElect: true | ||
resourceName: 98c9c988.spiffe.io | ||
resourceNamespace: {{ .Release.Namespace }} | ||
clusterName: {{ .Values.spire.clusterName }} | ||
trustDomain: {{ .Values.spire.trustDomain }} | ||
ignoreNamespaces: | ||
- kube-system | ||
- kube-public | ||
- spire-system | ||
- local-path-storage | ||
spireServerSocketPath: {{ .Values.server.config.socketPath | quote }} | ||
{{- end }} |
71 changes: 71 additions & 0 deletions
71
charts/spire/templates/spire-controller-manager-deployment.yaml
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,71 @@ | ||
{{- if eq (.Values.controllerManager.enabled | toString) "true" }} | ||
{{- $fullname := include "spire.fullname" . }} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ printf "%s-controller-manager" $fullname }} | ||
labels: | ||
{{- include "spire.controllerManager.labels" . | nindent 4 }} | ||
spec: | ||
replicas: {{ .Values.controllerManager.replicaCount }} | ||
selector: | ||
matchLabels: | ||
{{- include "spire.controllerManager.selectorLabels" . | nindent 6 }} | ||
template: | ||
metadata: | ||
{{- with .Values.controllerManager.podAnnotations }} | ||
annotations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
labels: | ||
{{- include "spire.controllerManager.selectorLabels" . | nindent 8 }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- range . }} | ||
- name: {{ printf "%s-%s" $fullname .name }} | ||
{{- end }} | ||
{{- end }} | ||
serviceAccountName: {{ include "spire.serviceAccountName" . }}-agent | ||
securityContext: | ||
{{- toYaml .Values.controllerManager.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Chart.Name }}-controller-manager | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 12 }} | ||
image: {{ template "spire.image" (dict "appVersion" $.Chart.AppVersion "image" .Values.controllerManager.image) }} | ||
imagePullPolicy: {{ .Values.controllerManager.image.pullPolicy }} | ||
args: | ||
- "--config=spire-controller-manager-config.yaml" | ||
ports: | ||
- containerPort: 9443 | ||
volumeMounts: | ||
- name: spire-server-socket | ||
mountPath: /run/spire/server-sockets | ||
readOnly: true | ||
- name: spire-controller-manager-config | ||
mountPath: /spire-controller-manager-config.yaml | ||
subPath: spire-controller-manager-config.yaml | ||
resources: | ||
{{- toYaml .Values.controllerManager.resources | nindent 12 }} | ||
volumes: | ||
- name: spire-server-socket | ||
hostPath: | ||
path: /run/spire/server-sockets | ||
type: DirectoryOrCreate | ||
- name: spire-controller-manager-config | ||
configMap: | ||
name: {{ include "spire.fullname" . }}-controller-manager-config | ||
{{- with .Values.controllerManager.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.controllerManager.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.controllerManager.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{ end }} |
19 changes: 19 additions & 0 deletions
19
charts/spire/templates/spire-controller-manager-webhook-service.yaml
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,19 @@ | ||
{{- if .Values.controllerManager.enabled }} | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "spire.fullname" . }}-controller-manager | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
{{- include "spire.server.labels" . | nindent 4 }} | ||
spec: | ||
type: {{ .Values.server.service.type }} | ||
ports: | ||
- name: https | ||
port: 443 | ||
targetPort: 9443 | ||
protocol: TCP | ||
selector: | ||
{{- include "spire.server.selectorLabels" . | nindent 4 }} | ||
{{- end }} | ||
|
35 changes: 35 additions & 0 deletions
35
charts/spire/templates/spire-controller-manager-webhook.yaml
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,35 @@ | ||
{{- if .Values.controllerManager.enabled }} | ||
apiVersion: admissionregistration.k8s.io/v1 | ||
kind: ValidatingWebhookConfiguration | ||
metadata: | ||
name: spire-controller-manager-webhook | ||
webhooks: | ||
- admissionReviewVersions: ["v1"] | ||
clientConfig: | ||
service: | ||
name: spire-controller-manager-webhook-service | ||
namespace: spire-system | ||
path: /validate-spire-spiffe-io-v1alpha1-clusterfederatedtrustdomain | ||
failurePolicy: Fail | ||
name: vclusterfederatedtrustdomain.kb.io | ||
rules: | ||
- apiGroups: ["spire.spiffe.io"] | ||
apiVersions: ["v1alpha1"] | ||
operations: ["CREATE", "UPDATE"] | ||
resources: ["clusterfederatedtrustdomains"] | ||
sideEffects: None | ||
- admissionReviewVersions: ["v1"] | ||
clientConfig: | ||
service: | ||
name: spire-controller-manager-webhook-service | ||
namespace: spire-system | ||
path: /validate-spire-spiffe-io-v1alpha1-clusterspiffeid | ||
failurePolicy: Fail | ||
name: vclusterspiffeid.kb.io | ||
rules: | ||
- apiGroups: ["spire.spiffe.io"] | ||
apiVersions: ["v1alpha1"] | ||
operations: ["CREATE", "UPDATE"] | ||
resources: ["clusterspiffeids"] | ||
sideEffects: None | ||
{{- 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
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