Skip to content

Commit fa65d4d

Browse files
committed
wip
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent add22fd commit fa65d4d

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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> {}

operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/preconditionandactivation/SecretDependentResource.java renamed to operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/preconditionandactivation/NotAvailableDependentResource.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@
1616
package io.javaoperatorsdk.operator.workflow.preconditionandactivation;
1717

1818
import io.fabric8.kubernetes.api.model.ObjectMetaBuilder;
19-
import io.fabric8.kubernetes.api.model.Secret;
2019
import io.javaoperatorsdk.operator.api.reconciler.Context;
2120
import 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())

operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/preconditionandactivation/PreconditionAndActivationReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
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
})

0 commit comments

Comments
 (0)