-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy: add spire manifests in helm and kustomize
Signed-off-by: TessaIO <ahmedgrati1999@gmail.com>
- Loading branch information
Showing
26 changed files
with
322 additions
and
95 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: spire | ||
repository: https://spiffe.github.io/helm-charts-hardened/ | ||
version: 0.24.1 | ||
digest: sha256:f3b4dc973a59682bf3aa5ca9b53322f57935dd093081e82a37b8082e00becbe9 | ||
generated: "2024-12-20T16:52:40.180416+01:00" |
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
Binary file not shown.
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
Empty file.
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,4 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: node-feature-discovery |
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,23 @@ | ||
# Required cluster role to allow spire-agent to query k8s API server | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: spire-agent-cluster-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["pods","nodes","nodes/proxy"] | ||
verbs: ["get"] | ||
|
||
--- | ||
# Binds above cluster role to spire-agent service account | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: spire-agent-cluster-role-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: spire-agent | ||
roleRef: | ||
kind: ClusterRole | ||
name: spire-agent-cluster-role | ||
apiGroup: rbac.authorization.k8s.io |
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,43 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: spire-agent | ||
data: | ||
agent.conf: | | ||
agent { | ||
data_dir = "/run/spire" | ||
log_level = "DEBUG" | ||
server_address = "spire-server" | ||
server_port = "8081" | ||
socket_path = "/run/spire/sockets/agent.sock" | ||
trust_bundle_path = "/run/spire/bundle/bundle.crt" | ||
trust_domain = "nfd.com" | ||
} | ||
plugins { | ||
NodeAttestor "k8s_sat" { | ||
plugin_data { | ||
cluster = "nfd" | ||
} | ||
} | ||
KeyManager "memory" { | ||
plugin_data { | ||
} | ||
} | ||
WorkloadAttestor "k8s" { | ||
plugin_data { | ||
skip_kubelet_verification = true | ||
node_name_env = "MY_NODE_NAME" | ||
} | ||
} | ||
WorkloadAttestor "unix" { | ||
plugin_data { | ||
} | ||
} | ||
} | ||
health_checks { | ||
listener_enabled = true | ||
bind_address = "0.0.0.0" | ||
bind_port = "8080" | ||
live_path = "/live" | ||
ready_path = "/ready" | ||
} |
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,55 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: spire-agent | ||
labels: | ||
app: spire-agent | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: spire-agent | ||
template: | ||
metadata: | ||
labels: | ||
app: spire-agent | ||
spec: | ||
hostPID: true | ||
hostNetwork: true | ||
dnsPolicy: ClusterFirstWithHostNet | ||
serviceAccountName: spire-agent | ||
initContainers: | ||
- name: init | ||
# This is a small image with wait-for-it, choose whatever image | ||
# you prefer that waits for a service to be up. This image is built | ||
# from https://github.com/lqhl/wait-for-it | ||
image: cgr.dev/chainguard/wait-for-it | ||
args: ["-t", "30", "spire-server:8081"] | ||
containers: | ||
- name: spire-agent | ||
image: ghcr.io/spiffe/spire-agent:1.5.1 | ||
args: ["-config", "/run/spire/config/agent.conf"] | ||
env: | ||
- name: MY_NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
volumeMounts: | ||
- name: spire-config | ||
mountPath: /run/spire/config | ||
readOnly: true | ||
- name: spire-bundle | ||
mountPath: /run/spire/bundle | ||
- name: spire-agent-socket | ||
mountPath: /run/spire/sockets | ||
readOnly: false | ||
volumes: | ||
- name: spire-config | ||
configMap: | ||
name: spire-agent | ||
- name: spire-bundle | ||
configMap: | ||
name: spire-bundle | ||
- name: spire-agent-socket | ||
hostPath: | ||
path: /run/spire/sockets | ||
type: DirectoryOrCreate |
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,4 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: spire-agent |
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,4 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: spire-bundle |
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,45 @@ | ||
# Role (namespace scoped) to be able to push certificate bundles to a configmap | ||
kind: Role | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: spire-server-configmap-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["configmaps"] | ||
verbs: ["patch", "get", "list"] | ||
--- | ||
# Binds above role to spire-server service account | ||
kind: RoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: spire-server-configmap-role-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: spire-server | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: Role | ||
name: spire-server-configmap-role | ||
--- | ||
# ClusterRole to allow spire-server node attestor to query Token Review API | ||
kind: ClusterRole | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: spire-server-trust-role | ||
rules: | ||
- apiGroups: ["authentication.k8s.io"] | ||
resources: ["tokenreviews"] | ||
verbs: ["create"] | ||
--- | ||
# Binds above cluster role to spire-server service account | ||
kind: ClusterRoleBinding | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
metadata: | ||
name: spire-server-trust-role-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: spire-server | ||
roleRef: | ||
kind: ClusterRole | ||
name: spire-server-trust-role | ||
apiGroup: rbac.authorization.k8s.io |
Empty file.
Empty file.
Empty file.
Empty file.
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.