confidential-containers / trustee-operator

Operator to manage the lifecycle of Trustee (KBS)
Apache License 2.0
3 stars 18 forks source link

attestation-policy: support set attestation-policy from configmap and update document for ibmse #40

Closed liudalibj closed 3 months ago

liudalibj commented 4 months ago
liudalibj commented 4 months ago

Built out a test CatalogSource.yaml for s390x.

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
 name:  trustee-operator-catalog
 namespace: openshift-marketplace
spec:
 displayName: Trustee Operator Catalog
 sourceType: grpc
 image:  icr.io/ikswhp_multiarch/trustee-operator-catalog:v0.1.0
 updateStrategy:
   registryPoll:
      interval: 5m

Configed and verified the PR on OCP cluster deploy on a lpar.

[root@bastion-ocp-cn kbs]# oc get deploy
NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
trustee-deployment                    1/1     1            1           14m
trustee-operator-controller-manager   1/1     1            1           51m
[root@bastion-ocp-cn kbs]# oc describe deploy trustee-deployment
Name:                   trustee-deployment
Namespace:              kbs-operator-system
CreationTimestamp:      Thu, 01 Aug 2024 12:23:00 -0400
Labels:                 <none>
Annotations:            deployment.kubernetes.io/revision: 2
Selector:               app=kbs
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  1 max unavailable, 25% max surge
Pod Template:
  Labels:  app=kbs
  Containers:
   kbs:
    Image:           icr.io/ikswhp_multiarch/kbs:e890fc90c384207668fa3a4d6a2f2a2d652797ee
    Port:            8080/TCP
    Host Port:       0/TCP
    SeccompProfile:  RuntimeDefault
    Command:
      /usr/local/bin/kbs
      --config-file
      /etc/kbs-config/kbs-config.json
    Environment:
      RUST_LOG:                    debug
      SE_SKIP_CERTS_VERIFICATION:  true
    Mounts:
      /etc/auth-secret from auth-secret (rw)
      /etc/https-cert from https-cert (rw)
      /etc/https-key from https-key (rw)
      /etc/kbs-config from kbs-config (rw)
      /opt/confidential-containers from confidential-containers (rw)
      /opt/confidential-containers/attestation-service/opa from attestation-opa (rw)
      /opt/confidential-containers/kbs/repository/default from default (rw)
      /opt/confidential-containers/kbs/repository/default/kbsres1 from kbsres1 (rw)
      /opt/confidential-containers/opa from opa (rw)
      /opt/confidential-containers/rvps/reference-values from reference-values (rw)
      /run/confidential-containers/ibmse/ from ibmse-pvc (rw)
  Volumes:
   confidential-containers:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     Memory
    SizeLimit:  <unset>
   default:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     Memory
    SizeLimit:  <unset>
   kbs-config:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      kbs-config
    Optional:  false
   attestation-opa:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      ibmse-attestation-policy
    Optional:  false
   opa:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      ibmse-resource-policy
    Optional:  false
   ibmse-pvc:
    Type:       PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
    ClaimName:  ibmse-pvc
    ReadOnly:   true
   auth-secret:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  kbs-auth-public-key
    Optional:    false
   https-key:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  kbs-https-key
    Optional:    false
   https-cert:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  kbs-https-certificate
    Optional:    false
   kbsres1:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  kbsres1
    Optional:    false
   reference-values:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      rvps-reference-values
    Optional:  false
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  trustee-deployment-855c56dc6 (0/0 replicas created)
NewReplicaSet:   trustee-deployment-5cf95bb7d9 (1/1 replicas created)
Events:
  Type    Reason             Age   From                   Message
  ----    ------             ----  ----                   -------
  Normal  ScalingReplicaSet  14m   deployment-controller  Scaled up replica set trustee-deployment-855c56dc6 to 1
  Normal  ScalingReplicaSet  10m   deployment-controller  Scaled up replica set trustee-deployment-5cf95bb7d9 to 1
  Normal  ScalingReplicaSet  10m   deployment-controller  Scaled down replica set trustee-deployment-855c56dc6 to 0 from 1
[root@bastion-ocp-cn kbs]#
liudalibj commented 4 months ago

@bpradipt @lmilleri would you like help to take a look on this PR, thanks.

liudalibj commented 4 months ago

FYI. @huoqifeng @savitrilh the trustee-operator update for ibmse

lmilleri commented 4 months ago

It looks good to me, thank you @liudalibj

liudalibj commented 3 months ago

@bpradipt would you like help to review this pr and help to merge it if there is no more comments, thanks!