Skip to content

Commit 03a121f

Browse files
committed
switch from free registry.access.redhat.com to tbr registry.redhat.io
1 parent 6936243 commit 03a121f

File tree

5 files changed

+106
-146
lines changed

5 files changed

+106
-146
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The samples resource offers the following configuration fields:
2929
- ManagementState
3030
-- Managed: the operator will update the samples as the configuration dictates
3131
-- Unmanaged: the operator will ignore updates to the samples resource object and any imagestreams or templates in the openshift namespace
32-
-- Removed: the operator will remove the set of managed imagestreams and templates in the openshift namespace. It will ignore new samples created by the cluster admin or any samples in the skipped lists. After the removals are complete, the operator will work like it is in the 'Unmanaged' state and ignore any watch events on the sample resources, imagestreams, or templates. It will operate on secrets to facilitate the 'centos' to 'rhel' switch. There are some caveats around concurrent creates and removal (see Change behaviors section).
32+
-- Removed: the operator will remove the set of managed imagestreams and templates in the openshift namespace. It will ignore new samples created by the cluster admin or any samples in the skipped lists. After the removals are complete, the operator will work like it is in the 'Unmanaged' state and ignore any watch events on the sample resources, imagestreams, or templates. There are some caveats around concurrent creates and removal (see Config behaviors section).
3333
- Samples Registry
3434
-- Override the registry that images are imported from
3535
- Architecture

pkg/apis/samples/v1/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,9 @@ func (s *Config) ClusterNeedsCreds() bool {
424424
s.Spec.ManagementState == operatorv1.Unmanaged {
425425
return false
426426
}
427+
if s.Status.Conditions == nil {
428+
return true
429+
}
427430
return s.ConditionFalse(ImportCredentialsExist) && (s.Spec.SamplesRegistry == "" || s.Spec.SamplesRegistry == "registry.redhat.io")
428431
}
429432

pkg/stub/handler.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,6 @@ func (h *Handler) CreateDefaultResourceIfNeeded(cfg *v1.Config) (*v1.Config, err
274274
cfg.Kind = "Config"
275275
cfg.APIVersion = v1.GroupName + "/" + v1.Version
276276
cfg.Spec.Architectures = append(cfg.Spec.Architectures, v1.X86Architecture)
277-
//TODO force use of registry.access.redhat.com until we sort out TBR/registry.redhat.io creds
278-
cfg.Spec.SamplesRegistry = "registry.access.redhat.com"
279277
cfg.Spec.ManagementState = operatorsv1api.Managed
280278
h.AddFinalizer(cfg)
281279
// we should get a watch event for the default pull secret, but just in case
@@ -386,10 +384,6 @@ func (h *Handler) CleanUpOpenshiftNamespaceOnDelete(cfg *v1.Config) error {
386384
return err
387385
}
388386

389-
//TODO when we start copying secrets from kubesystem to act as the default secret for pulling rhel content
390-
// we'll want to delete that one too ... we'll need to put a marking on the secret to indicate we created it
391-
// vs. the admin creating it
392-
393387
return nil
394388
}
395389

@@ -417,8 +411,12 @@ func (h *Handler) Handle(event v1.Event) error {
417411
return nil
418412
}
419413

420-
//TODO what do we do about possible missed delete events since we
421-
// cannot add a finalizer in our namespace secret
414+
// if we miss a delete event in the openshift namespace (since we cannot
415+
// add a finalizer in our namespace secret), we our watch
416+
// on the kube-system coreos pull secret should still repopulate;
417+
// if that gets deleted, the whole cluster is hosed; plus, there is talk
418+
// of moving data like that to a special config namespace that is somehow
419+
// protected
422420

423421
cfg, _ := h.crdwrapper.Get(v1.ConfigName)
424422
if cfg != nil {

0 commit comments

Comments
 (0)