File tree Expand file tree Collapse file tree 3 files changed +32
-6
lines changed
operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/preconditionandactivation Expand file tree Collapse file tree 3 files changed +32
-6
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Java Operator SDK Authors
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package io .javaoperatorsdk .operator .workflow .preconditionandactivation ;
17+
18+ import io .fabric8 .kubernetes .client .CustomResource ;
19+ import io .fabric8 .kubernetes .model .annotation .Group ;
20+ import io .fabric8 .kubernetes .model .annotation .ShortNames ;
21+ import io .fabric8 .kubernetes .model .annotation .Version ;
22+
23+ @ Group ("sample.javaoperatorsdk" )
24+ @ Version ("v1" )
25+ @ ShortNames ("nac" )
26+ public class NotAvailableCustomResource extends CustomResource <Void , Void > {}
Original file line number Diff line number Diff line change 1616package io .javaoperatorsdk .operator .workflow .preconditionandactivation ;
1717
1818import io .fabric8 .kubernetes .api .model .ObjectMetaBuilder ;
19- import io .fabric8 .kubernetes .api .model .Secret ;
2019import io .javaoperatorsdk .operator .api .reconciler .Context ;
2120import io .javaoperatorsdk .operator .processing .dependent .kubernetes .CRUDKubernetesDependentResource ;
2221
23- public class SecretDependentResource
24- extends CRUDKubernetesDependentResource <Secret , PreconditionAndActivationCustomResource > {
22+ public class NotAvailableDependentResource
23+ extends CRUDKubernetesDependentResource <
24+ NotAvailableCustomResource , PreconditionAndActivationCustomResource > {
2525
2626 @ Override
27- protected Secret desired (
27+ protected NotAvailableCustomResource desired (
2828 PreconditionAndActivationCustomResource primary ,
2929 Context <PreconditionAndActivationCustomResource > context ) {
30- Secret secret = new Secret ();
30+ NotAvailableCustomResource secret = new NotAvailableCustomResource ();
3131 secret .setMetadata (
3232 new ObjectMetaBuilder ()
3333 .withName (primary .getMetadata ().getName ())
Original file line number Diff line number Diff line change 3131 type = ConfigMapDependentResource .class ,
3232 reconcilePrecondition = FalseReconcilePrecondition .class ),
3333 @ Dependent (
34- type = SecretDependentResource .class ,
34+ type = NotAvailableDependentResource .class ,
3535 activationCondition = FalseActivationCondition .class ,
3636 dependsOn = "configmap" )
3737 })
You can’t perform that action at this time.
0 commit comments