Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update spire server port to 443 #1045

Merged
merged 4 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ kind: Role
metadata:
name: leader-election-role
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources: ["configmaps"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: spire-server-spire-controller-manager
labels:
{{- include "spire.labels" . | nindent 4 }}
rules:
- apiGroups: [ "" ]
resources: [ "endpoints" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ kind: RoleBinding
metadata:
name: leader-election-rolebinding
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: spire-server-spire-controller-manager
labels:
{{- include "spire.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ metadata:
name: "csi.spiffe.io"
annotations:
"helm.sh/hook": pre-install
labels:
{{- include "spire.labels" . | nindent 4 }}
spec:
# We only support ephemeral, inline volumes. We don't need a controller to
# provision and attach volumes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ metadata:
pod-security.kubernetes.io/audit: privileged
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/warn: privileged
{{- include "spire.labels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ metadata:
pod-security.kubernetes.io/audit: privileged
pod-security.kubernetes.io/enforce: privileged
pod-security.kubernetes.io/warn: privileged
{{- include "spire.labels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-agent
labels:
{{- include "spire.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: spire-agent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-agent
labels:
{{- include "spire.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ kind: ConfigMap
metadata:
name: spire-agent
namespace: {{ .Values.global.spire.namespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
data:
agent.conf: |
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metadata:
namespace: {{ .Values.global.spire.namespace }}
labels:
app: spire-agent
{{- include "spire.labels" . | nindent 4 }}
annotations: {{ .Values.spireAgent.annotations | toYaml | nindent 4 }}
spec:
selector:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ kind: ServiceAccount
metadata:
name: spire-agent
namespace: {{ .Values.global.spire.namespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ kind: ConfigMap
metadata:
name: spire-controller-manager-config
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
data:
spire-controller-manager-config.yaml: |
apiVersion: spire.spiffe.io/v1alpha1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
name: spire-controller-manager-webhook
labels:
{{- include "spire.labels" . | nindent 4 }}
webhooks:
- admissionReviewVersions: ["v1"]
clientConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ kind: ConfigMap
metadata:
name: spire-bundle
namespace: {{ .Values.global.spire.namespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ kind: Service
metadata:
name: spire-server-bundle-endpoint
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
spec:
type: {{ .Values.bundleEndpoint.type }}
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-server-spire-server
labels:
{{- include "spire.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: spire-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-server-spire-server
labels:
{{- include "spire.labels" . | nindent 4 }}
rules:
- apiGroups: [""]
resources: ["nodes"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ kind: ConfigMap
metadata:
name: spire-server
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
data:
server.conf: |
{
"server": {
"audit_log_enabled": true,
"bind_address": "0.0.0.0",
"bind_port": "8081",
"bind_port": {{ .Values.spireServer.containerPort}},
"trust_domain": {{ .Values.global.spire.trustDomain | quote }},
"data_dir": {{ .Values.spireServer.dataDir | quote }},
"log_level": {{ .Values.global.spire.logLevel | quote }},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ kind: Service
metadata:
name: spire-controller-manager-webhook-service
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
spec:
ports:
- port: 443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-server-role-binding
namespace: {{ .Values.global.spire.namespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
name: spire-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: spire-server-role
namespace: {{ .Values.global.spire.namespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
rules:
# allow "get" access to pods (to resolve selectors for PSAT attestation)
- apiGroups: [""]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ kind: ServiceAccount
metadata:
name: spire-server
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ kind: Service
metadata:
name: spire-server
namespace: {{ .Values.global.spire.serverNamespace }}
labels:
{{- include "spire.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- name: api
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.port }}
- name: grpc
port: {{ .Values.global.spire.serverPort }}
targetPort: grpc
protocol: TCP
selector:
app: spire-server
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ metadata:
labels:
app: spire-server
app.kubernetes.io/component: server
{{- include "spire.labels" . | nindent 4 }}
spec:
serviceName: spire-server
replicas: {{ .Values.replicaCount }}
Expand Down Expand Up @@ -47,8 +48,9 @@ spec:
memory: {{ .Values.resources.agent.requests.memory }}
cpu: {{ .Values.resources.agent.requests.cpu }}
ports:
- containerPort: 8081
- containerPort: {{ .Values.spireServer.containerPort }}
protocol: TCP
name: grpc
- containerPort: 8080
name: healthz

Expand Down
4 changes: 2 additions & 2 deletions helm-charts/0.26.1/charts/spire/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ service:
# Possible values are: ClusterIP, NodePort, LoadBalancer.
# Defaults to `ClusterIP`.
type: ClusterIP
# -- Service port.
port: 8081
# -- Additional Service annotations.
annotations: {}

Expand Down Expand Up @@ -85,6 +83,8 @@ spireServer:
configDir: "/run/spire/server/config"
# -- The private socket directory for the SPIRE Server.
privateSocketDir: "/tmp/spire-server/private"
# -- The internal port that the server serves.
containerPort: "8081"

# -- These are the default resources suitable for a moderate SPIRE usage.
# Of course, it's best to do your own benchmarks and update these
Expand Down
3 changes: 2 additions & 1 deletion helm-charts/0.26.1/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,5 @@ global:
logLevel: DEBUG
# -- The SPIRE Server port. This is the port where the SPIRE Server will
# listen for incoming connections.
serverPort: 8081
# This is the port of the SPIRE server k8s Service.
serverPort: 443
Loading