-
Notifications
You must be signed in to change notification settings - Fork 17
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
retain and size set #172
retain and size set #172
Conversation
Signed-off-by: Ryan Cook <[email protected]>
Will that PR include changes of |
Signed-off-by: Ryan Cook <[email protected]>
Signed-off-by: Ryan Cook <[email protected]>
@osmman somewhat fighting through pvc naming right now. It's somewhat weird. Things appear to break if the variables of pvcName are used in their current way. |
Signed-off-by: Ryan Cook <[email protected]>
Signed-off-by: Ryan Cook <[email protected]>
//Enable Service monitors for rekor | ||
Monitoring MonitoringConfig `json:"monitoring,omitempty"` | ||
//Rekor Search UI | ||
RekorSearchUI RekorSearchUI `json:"rekorSearchUI,omitempty"` | ||
// Signer configuration | ||
Signer RekorSigner `json:"signer,omitempty"` | ||
// PVC configuration | ||
Pvc Pvc `json:"pvc,omitempty"` |
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.
It looks like there is some bug when we setting default values. I sucessfully broke operator on nil pointer exception when I use this object:
apiVersion: rhtas.redhat.com/v1alpha1
kind: Trillian
metadata:
name: example
namespace: test
spec: {}
Error message:
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x103dce254]
goroutine 466 [running]:
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
/Users/tturek/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:116 +0x1a4
panic({0x104276580?, 0x10527ccb0?})
/opt/homebrew/Cellar/go/1.21.5/libexec/src/runtime/panic.go:914 +0x218
github.com/securesign/operator/controllers/trillian/actions/logserver.deployAction.Handle(.....)
/Users/tturek/Workspace/securesign/secure-sign-operator/controllers/trillian/actions/logserver/deployment.go:48 +0x1e4
api/v1alpha1/common.go
Outdated
Size string `json:"size,omitempty"` | ||
// Retain policy for the PVC | ||
//+kubebuilder:default:=true | ||
Retain bool `json:"retain"` |
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.
default value is not work correctly. It will be set false
for this example:
spec:
database:
create: true
final values will be
spec:
database:
create: true
databaseSecretRef:
name: rhtassk4q9
pvc:
name: trillian-mysql
retain: false
size: 5Gi
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.
@osmman I think this was a fallout of moving those items to common. This should be fixed now
Signed-off-by: Ryan Cook <[email protected]>
@osmman we should be good with the config above deploy
Verification
|
I'll look to see if the trillian bug is still there |
You can cherry pick 3b7fee8f2de03b7a11ae67fd837e6cba9e75690a commit it should fix it. |
Signed-off-by: Ryan Cook <[email protected]>
Signed-off-by: Ryan Cook <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cooktheryan, osmman The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
Set the pvc to be retained at default and specify size.
Follow up PR will include setting name but out of scope for initial issue. Also has been somewhat challenging so wanted to get this in and working first then begin the process to allow for name change