Replies: 1 comment
-
These are the docker commands I used to build the opensearch operator image: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to build my own image to load from my repository for opensearch operator and opensearch cluster. I am new to GO lang, which part of the code I need to modify to build an image for opensearch operator to use opensearch image from my repository as I don't have online access in the network and Kyverno policies restrict loading unknown repository. I tried doing docker pull for opensearch operator from docker hub and I am able to deploy the operator, however I couldn't bring up opensearch cluster due to image registry restriction. So, I need to change the code to use my own repository on urgent basis.
I am implementing this opensearch in GKE using helm chart and ArgoCD to deploy it. I am currently building the cluster in version 2.11.1, basically doing a devops to automate the implementation.
The snippet of error I am seeing in opensearch operator logs.
{"level":"error","ts":"2024-02-22T11:13:29.444Z","msg":"Reconciler error","controller":"opensearchcluster","controllerGroup":"opensearch.opster.io","controllerKind":"OpenSearchCluster","OpenSearchCluster":{"name":"opensearchcluster","namespace":"observability"},"namespace":"observability","name":"opensearchcluster","reconcileID":"91447943-8760-4603-883f-a70c65a5f959","error":"failed to create resource: creating resource failed: admission webhook "validate.kyverno.svc-ignore" denied the request: \n\nresource Job/observability/opensearchcluster-securityconfig-update was blocked due to the following policies \n\nrestrict-image-registries:\n autogen-validate-registries: 'validation error: Unknown image registry. rule autogen-validate-registries\n failed at path /spec/template/spec/containers/0/image/'\n","errorVerbose":"admission webhook "validate.kyverno.svc-ignore" denied the request: \n\nresource Job/observability/opensearchcluster-securityconfig-update was blocked due to the following policies \n\nrestrict-image-registries:\n autogen-validate-registries: 'validation error: Unknown image registry. rule autogen-validate-registries\n failed at path /spec/template/spec/containers/0/image/'\n\ncreating resource failed\ngithub.com/cisco-open/operator-tools/pkg/reconciler.(*GenericResourceReconciler).CreateIfNotExist\n\t/go/pkg/mod/github.com/cisco-open/[email protected]/pkg/reconciler/resource.go:594\ngithub.com/cisco-open/operator-tools/pkg/reconciler.(*GenericResourceReconciler).ReconcileResource\n\t/go/pkg/mod/github.com/cisco-open/[email protected]/pkg/reconciler/resource.go:382\ngithub.com/Opster/opensearch-k8s-operator/opensearch-operator/pkg/reconcilers/k8s.K8sClientImpl.ReconcileResource\n\t/workspace/pkg/reconcilers/k8s/client.go:198\ngithub.com/Opster/opensearch-k8s-operator/opensearch-operator/pkg/reconcilers/k8s.K8sClientImpl.CreateJob\n\t/workspace/pkg/reconcilers/k8s/client.go:99\ngithub.com/Opster/opensearch-k8s-operator/opensearch-operator/pkg/reconcilers.(*SecurityconfigReconciler).Reconcile\n\t/workspace/pkg/reconcilers/securityconfig.go:182\ngithub.com/Opster/opensearch-k8s-operator/opensearch-operator/controllers.(*OpenSearchClusterReconciler).reconcilePhaseRunning\n\t/workspace/controllers/opensearchController.go:319\ngithub.com/Opster/opensearch-k8s-operator/opensearch-operator/controllers.(*OpenSearchClusterReconciler).Reconcile\n\t/workspace/controllers/opensearchController.go:141\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:118\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:314\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:265\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:226\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1594\nfailed to create resource","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:324\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:265\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:226"}
Beta Was this translation helpful? Give feedback.
All reactions