Skip to content

Commit b616626

Browse files
committed
updates
1 parent 3ab8078 commit b616626

File tree

11 files changed

+14
-158
lines changed

11 files changed

+14
-158
lines changed

api/v1alpha1/common.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ type CtlogService struct {
4040
//+optional
4141
Address string `json:"address,omitempty"`
4242
// Port of Ctlog Log Server End point
43-
//+kubebuilder:validation:Minimum:=1
43+
//+kubebuilder:validation:Minimum:=0
4444
//+kubebuilder:validation:Maximum:=65535
45-
//+kubebuilder:default:=80
45+
//+kubebuilder:default:=0
4646
//+optional
4747
Port *int32 `json:"port,omitempty"`
4848
}

api/v1alpha1/trillian_types.go

-6
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ type TrillianSpec struct {
2929
Db TrillianDB `json:"database,omitempty"`
3030
//+optional
3131
TrillianServer TrillianServer `json:"server,omitempty"`
32-
//+optional
33-
TrillianSigner TrillianSigner `json:"signer,omitempty"`
3432
// Enable Monitoring for Logsigner and Logserver
3533
Monitoring MonitoringConfig `json:"monitoring,omitempty"`
3634
}
@@ -57,10 +55,6 @@ type TrillianServer struct {
5755
// Secret with TLS server certificate, private key and CA certificate
5856
TLSCertificate TLSCert `json:"tls"`
5957
}
60-
type TrillianSigner struct {
61-
// Secret with TLS server certificate, private key and CA certificate
62-
TLSCertificate TLSCert `json:"tls"`
63-
}
6458

6559
// TrillianStatus defines the observed state of Trillian
6660
type TrillianStatus struct {

api/v1alpha1/zz_generated.deepcopy.go

-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/rhtas.redhat.com_securesigns.yaml

-61
Original file line numberDiff line numberDiff line change
@@ -844,67 +844,6 @@ spec:
844844
required:
845845
- tls
846846
type: object
847-
signer:
848-
properties:
849-
tls:
850-
description: Secret with TLS server certificate, private key
851-
and CA certificate
852-
properties:
853-
caCertRef:
854-
description: Reference to CA certificate
855-
properties:
856-
name:
857-
description: |-
858-
Name of the referent.
859-
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
860-
type: string
861-
required:
862-
- name
863-
type: object
864-
x-kubernetes-map-type: atomic
865-
certRef:
866-
description: Reference to service certificate
867-
properties:
868-
key:
869-
description: The key of the secret to select from.
870-
Must be a valid secret key.
871-
pattern: ^[-._a-zA-Z0-9]+$
872-
type: string
873-
name:
874-
description: |-
875-
Name of the referent.
876-
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
877-
type: string
878-
required:
879-
- key
880-
- name
881-
type: object
882-
x-kubernetes-map-type: atomic
883-
privateKeyRef:
884-
description: Reference to the private key
885-
properties:
886-
key:
887-
description: The key of the secret to select from.
888-
Must be a valid secret key.
889-
pattern: ^[-._a-zA-Z0-9]+$
890-
type: string
891-
name:
892-
description: |-
893-
Name of the referent.
894-
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
895-
type: string
896-
required:
897-
- key
898-
- name
899-
type: object
900-
x-kubernetes-map-type: atomic
901-
type: object
902-
x-kubernetes-validations:
903-
- message: privateKeyRef cannot be empty
904-
rule: (!has(self.certRef) || has(self.privateKeyRef))
905-
required:
906-
- tls
907-
type: object
908847
type: object
909848
tuf:
910849
default:

config/crd/bases/rhtas.redhat.com_trillians.yaml

-61
Original file line numberDiff line numberDiff line change
@@ -195,67 +195,6 @@ spec:
195195
required:
196196
- tls
197197
type: object
198-
signer:
199-
properties:
200-
tls:
201-
description: Secret with TLS server certificate, private key and
202-
CA certificate
203-
properties:
204-
caCertRef:
205-
description: Reference to CA certificate
206-
properties:
207-
name:
208-
description: |-
209-
Name of the referent.
210-
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
211-
type: string
212-
required:
213-
- name
214-
type: object
215-
x-kubernetes-map-type: atomic
216-
certRef:
217-
description: Reference to service certificate
218-
properties:
219-
key:
220-
description: The key of the secret to select from. Must
221-
be a valid secret key.
222-
pattern: ^[-._a-zA-Z0-9]+$
223-
type: string
224-
name:
225-
description: |-
226-
Name of the referent.
227-
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
228-
type: string
229-
required:
230-
- key
231-
- name
232-
type: object
233-
x-kubernetes-map-type: atomic
234-
privateKeyRef:
235-
description: Reference to the private key
236-
properties:
237-
key:
238-
description: The key of the secret to select from. Must
239-
be a valid secret key.
240-
pattern: ^[-._a-zA-Z0-9]+$
241-
type: string
242-
name:
243-
description: |-
244-
Name of the referent.
245-
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
246-
type: string
247-
required:
248-
- key
249-
- name
250-
type: object
251-
x-kubernetes-map-type: atomic
252-
type: object
253-
x-kubernetes-validations:
254-
- message: privateKeyRef cannot be empty
255-
rule: (!has(self.certRef) || has(self.privateKeyRef))
256-
required:
257-
- tls
258-
type: object
259198
type: object
260199
status:
261200
description: TrillianStatus defines the observed state of Trillian

config/manager/kustomization.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ resources:
33
apiVersion: kustomize.config.k8s.io/v1beta1
44
kind: Kustomization
55
images:
6-
- digest: sha256:a21f7128694a64989bf0d84a7a7da4c1ffc89edf62d594dc8bea7bcfe9ac08d3
7-
name: controller
8-
newName: registry.redhat.io/rhtas/rhtas-rhel9-operator
6+
- name: controller
7+
newName: quay.io/fghanmi/my_operator
8+
newTag: v3.8.0

config/samples/rhtas_v1alpha1_securesign.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ spec:
2323
config:
2424
OIDCIssuers:
2525
- ClientID: "trusted-artifact-signer"
26-
IssuerURL: "https://your-oidc-issuer-url"
27-
Issuer: "https://your-oidc-issuer-url"
26+
IssuerURL: "https://keycloak-keycloak-system.apps.rosa.av42p-79zot-u82.x8pi.p3.openshiftapps.com/auth/realms/trusted-artifact-signer"
27+
Issuer: "https://keycloak-keycloak-system.apps.rosa.av42p-79zot-u82.x8pi.p3.openshiftapps.com/auth/realms/trusted-artifact-signer"
2828
Type: "email"
2929
certificate:
3030
organizationName: Red Hat

internal/controller/constants/images.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ var (
1010

1111
FulcioServerImage = "registry.redhat.io/rhtas/fulcio-rhel9@sha256:c4abc6342b39701d237ab3f0f25b75b677214b3ede00540b2488f524ad112179"
1212

13-
RekorRedisImage = "registry.redhat.io/rhtas/trillian-redis-rhel9@sha256:5f0630c7aa29eeee28668f7ad451f129c9fb2feb86ec21b6b1b0b5cc42b44f4a"
14-
RekorServerImage = "registry.redhat.io/rhtas/rekor-server-rhel9@sha256:d4ea970447f3b4c18c309d2f0090a5d02260dd5257a0d41f87fefc4f014a9526"
13+
RekorRedisImage = "registry.redhat.io/rhtas/trillian-redis-rhel9@sha256:5f0630c7aa29eeee28668f7ad451f129c9fb2feb86ec21b6b1b0b5cc42b44f4a"
14+
// RekorServerImage = "registry.redhat.io/rhtas/rekor-server-rhel9@sha256:d4ea970447f3b4c18c309d2f0090a5d02260dd5257a0d41f87fefc4f014a9526"
15+
RekorServerImage = "quay.io/securesign/rekor-server_test:latest"
1516
RekorSearchUiImage = "registry.redhat.io/rhtas/rekor-search-ui-rhel9@sha256:5eabf561c0549d81862e521ddc1f0ab91a3f2c9d99dcd83ab5a2cf648a95dd19"
1617
BackfillRedisImage = "registry.redhat.io/rhtas/rekor-backfill-redis-rhel9@sha256:5c7460ab3cd13b2ecf2b979f5061cb384174d6714b7630879e53d063e4cb69d2"
1718

internal/controller/rekor/actions/server/config_map.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ func (i configMapAction) Name() string {
3030
func (i configMapAction) CanHandle(ctx context.Context, instance *rhtasv1alpha1.Rekor) bool {
3131
c := meta.FindStatusCondition(instance.Status.Conditions, constants.Ready)
3232
cm, _ := k8sutils.GetConfigMap(ctx, i.Client, instance.Namespace, "ca-configmap")
33-
// signingKeySecret: OCP related
33+
// signingKeySecret: OCP
3434
signingKeySecret, _ := k8sutils.GetSecret(i.Client, "openshift-service-ca", "signing-key")
35-
return c.Reason == constants.Creating || c.Reason == constants.Ready && cm == nil && signingKeySecret != nil
35+
return (c.Reason == constants.Creating || c.Reason == constants.Ready) && cm == nil && signingKeySecret != nil && instance.Spec.TLSCertificate.CACertRef == nil
3636
}
3737

3838
func (i configMapAction) Handle(ctx context.Context, instance *rhtasv1alpha1.Rekor) *action.Result {

internal/controller/trillian/actions/logserver/deployment.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (i deployAction) Handle(ctx context.Context, instance *rhtasv1alpha1.Trilli
111111
Name: "tls-cert",
112112
VolumeSource: corev1.VolumeSource{
113113
Secret: &corev1.SecretVolumeSource{
114-
SecretName: "log-server-" + instance.Name + "-tls-secret",
114+
SecretName: instance.Name + "-trillian-log-server-tls-secret",
115115
},
116116
},
117117
})

internal/controller/trillian/actions/logserver/service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (i createServiceAction) Handle(ctx context.Context, instance *rhtasv1alpha1
7979
if logserverService.Annotations == nil {
8080
logserverService.Annotations = make(map[string]string)
8181
}
82-
logserverService.Annotations["service.beta.openshift.io/serving-cert-secret-name"] = "log-server-" + instance.Name + "-tls-secret"
82+
logserverService.Annotations["service.beta.openshift.io/serving-cert-secret-name"] = instance.Name + "-trillian-log-server-tls-secret"
8383
err := i.Client.Update(ctx, logserverService)
8484
if err != nil {
8585
return i.FailedWithStatusUpdate(ctx, fmt.Errorf("could not annotate logserver service: %w", err), instance)

0 commit comments

Comments
 (0)