-
Notifications
You must be signed in to change notification settings - Fork 90
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
KBS: Enable deployment for s390x #436
Merged
Xynnn007
merged 3 commits into
confidential-containers:main
from
BbolroC:enable-kustomize-kbs-for-s390x
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Resource Policy | ||
# --------------- | ||
# | ||
# The resource policy of KBS is to make a strategic decision on | ||
# whether the requester has access to resources based on the | ||
# input Attestation Claims (including tee-pubkey, tcb-status, and other information) | ||
# and KBS Resource Path. | ||
# | ||
# The format of the resource path data is: | ||
# ``` | ||
# { | ||
# "resource-path": <PATH> | ||
# } | ||
# ``` | ||
# | ||
# The <PATH> variable is a KBS resource path, | ||
# which is required to be a string in three segment path format:<TOP>/<MIDDLE>/<TAIL>, | ||
# for example: "my'repo/License/key". | ||
# | ||
# The format of Attestation Claims Input is defined by the attestation service, | ||
# and its format may look like the following: | ||
# ``` | ||
# { | ||
# "tee-pubkey": "", | ||
# "tcb-status": { | ||
# "productId": “”, | ||
# "svn": “”, | ||
# …… | ||
# } | ||
# …… | ||
# } | ||
# ``` | ||
|
||
package policy | ||
|
||
default allow = false | ||
|
||
allow { | ||
input["tee"] != "sample" | ||
} |
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.
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: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: coco-tenant | ||
|
||
resources: | ||
- ../../overlays/x86_64 | ||
|
||
patches: | ||
- path: patch.yaml | ||
target: | ||
group: "" | ||
kind: Service | ||
name: kbs |
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,3 @@ | ||
- op: add | ||
path: /spec/type | ||
value: NodePort |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: coco-tenant | ||
|
||
resources: | ||
- ../../base |
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,20 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: coco-tenant | ||
|
||
resources: | ||
- ../common | ||
- pvc.yaml | ||
|
||
patches: | ||
- path: patch.yaml | ||
target: | ||
kind: Deployment | ||
name: kbs | ||
|
||
# Store keys that KBS will release to workloads after attestation: | ||
# kbs:///reponame/workload_key/key.bin | ||
secretGenerator: | ||
- files: | ||
- key.bin | ||
name: keys |
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 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: kbs | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: kbs | ||
env: | ||
- name: SE_SKIP_CERTS_VERIFICATION | ||
value: "false" | ||
volumeMounts: | ||
- name: test-local-volume | ||
mountPath: /run/confidential-containers/ibmse/ | ||
volumes: | ||
- name: test-local-volume | ||
persistentVolumeClaim: | ||
claimName: test-local-pvc |
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,20 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: test-local-pv | ||
spec: | ||
capacity: | ||
storage: 1Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: local-storage | ||
local: | ||
path: ${IBM_SE_CREDS_DIR} | ||
nodeAffinity: | ||
required: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/hostname | ||
operator: In | ||
values: | ||
- ${NODE_NAME} |
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,12 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: test-local-pvc | ||
namespace: coco-tenant | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: local-storage | ||
resources: | ||
requests: | ||
storage: 1Gi |
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't support updates at runtime or provisioning resources, right? Maybe this is fine in the short term.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it is just used for copying any data from a read-only mounting point to a writable one before creating a container. I agree with your opinion. Thanks!