Still having problem with deploying custome object...
# kubernetes
g
Still having problem with deploying custome object for the opensearch operator:
Copy code
kubernetes:opensearch.opster.io/v1:OpenSearchCluster (default/logs):
    error: Preview failed: 1 error occurred:
    	* the Kubernetes API server reported that "default/logs" failed to fully initialize or become live: Server-Side Apply field conflict detected. See <https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/#handle-field-conflicts-on-existing-resources> for troubleshooting help.
    The resource managed by field manager "pulumi-kubernetes-7cdd0b43" had an apply conflict: Apply failed with 1 conflict: conflict with "Go-http-client" using opensearch.opster.io/v1: .spec.nodePools
Here's the code:
Copy code
opensearch_cluster_crd = k8s.yaml.ConfigFile(
        "crd-opensearch-cluster",
        file=template_path,
        opts=pulumi.ResourceOptions(
            provider=k8s_provider,
            depends_on=[opensearch_ns],
            ignore_changes=["spec.nodePools"]
        )
    )
also tried
ignore_changes=["spec"]
Copy code
apiVersion: <http://opensearch.opster.io/v1|opensearch.opster.io/v1>
kind: OpenSearchCluster
metadata:
  name: logs
  namespace: opensearch-cluster
  annotations:
    <http://pulumi.com/skipAwait|pulumi.com/skipAwait>: "true"
spec:
  security:
    config: {}
    tls:
      http:
        generate: true
      transport:
        generate: true
        perNode: true
  general:
    httpPort: 9200
    serviceName: logs
    version: 2.14.0
    pluginsList: ["repository-s3"]
    drainDataNodes: true
  dashboards:
    tls:
      enable: true
      generate: true
    version: 2.14.0
    enable: true
    replicas: 1
    resources:
      requests:
        memory: "512Mi"
        cpu: "200m"
      limits:
        memory: "512Mi"
        cpu: "200m"
  nodePools:
    - component: masters
      replicas: 3
      resources:
        requests:
          memory: "4Gi"
          cpu: "1000m"
        limits:
          memory: "4Gi"
          cpu: "1000m"
      roles:
        - "data"
        - "cluster_manager"
      persistence:
        emptyDir: {}
ok it's solved by adding annotation straight to the manifest:
Copy code
apiVersion: <http://opensearch.opster.io/v1|opensearch.opster.io/v1>
kind: OpenSearchCluster
metadata:
  name: logs
  namespace: opensearch-cluster
  annotations:
    <http://pulumi.com/skipAwait|pulumi.com/skipAwait>: "true"
    <http://pulumi.com/patchForce|pulumi.com/patchForce>: "true"