Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ limitations under the License.
package main

import (
"context"
"crypto/tls"
"flag"
"os"
Expand Down Expand Up @@ -160,8 +159,7 @@ func main() {
}
}
//+kubebuilder:scaffold:builder

ctx := context.TODO() // TODO
ctx := ctrl.SetupSignalHandler()
if err := jobframework.SetupWorkloadOwnerIndex(ctx, mgr.GetFieldIndexer(), controller.GVK); err != nil {
setupLog.Error(err, "Setting up indexes", "GVK", controller.GVK)
os.Exit(1)
Expand All @@ -177,7 +175,7 @@ func main() {
}

setupLog.Info("starting manager")
if err := mgr.Start(ctrl.SetupSignalHandler()); err != nil {
if err := mgr.Start(ctx); err != nil {
setupLog.Error(err, "problem running manager")
os.Exit(1)
}
Expand Down
36 changes: 16 additions & 20 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,22 @@ spec:
labels:
control-plane: controller-manager
spec:
# TODO(user): Uncomment the following code to configure the nodeAffinity expression
# according to the platforms which are supported by your solution.
# It is considered best practice to support multiple architectures. You can
# build your manager image using the makefile target docker-buildx.
# affinity:
# nodeAffinity:
# requiredDuringSchedulingIgnoredDuringExecution:
# nodeSelectorTerms:
# - matchExpressions:
# - key: kubernetes.io/arch
# operator: In
# values:
# - amd64
# - arm64
# - ppc64le
# - s390x
# - key: kubernetes.io/os
# operator: In
# values:
# - linux
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- arm64
- ppc64le
- s390x
- key: kubernetes.io/os
operator: In
values:
- linux
securityContext:
runAsNonRoot: true
# TODO(user): For common cases that do not require escalating privileges
Expand Down
4 changes: 0 additions & 4 deletions config/samples/kustomization.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions config/samples/workload_v1beta2_appwrapper.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion internal/controller/appwrapper_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (r *AppWrapperReconciler) createComponents(ctx context.Context, aw *workloa
}

func (r *AppWrapperReconciler) deleteComponents(ctx context.Context, aw *workloadv1beta2.AppWrapper) bool {
// TODO forceful deletion
// TODO forceful deletion: See https://github.com/project-codeflare/appwrapper/issues/36
log := log.FromContext(ctx)
remaining := 0
for _, component := range aw.Spec.Components {
Expand Down