Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ai-telemetry skeleton folders and zookeeper #547

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RH-csaggin
Copy link
Contributor

  • Added ai-telemetry skeleton folders
  • Zookeeper:
    • Moved to kustomization structure.
    • Added custom pvc (removed from the integrated template on sts).
    • Added namePrefix: obs- for a better identification.
  • Tested on lab cluster with oc kustomize overlays/nerc-ocp-obs | oc create -f - -n zookeeper-obs

@RH-csaggin RH-csaggin closed this Sep 27, 2024
@RH-csaggin RH-csaggin reopened this Sep 27, 2024
@computate
Copy link
Member

@RH-csaggin For ArgoCD to properly sync namespaces that need to be created first, we add them to a cluster-scope bundle. Let's add to this PR:

  • cluster-scope/base/core/namespaces/zookeeper/ similar to cluster-scope/base/core/namespaces/keycloak/.
  • cluster-scope/bundles/zookeeper/ similar to cluster-scope/bundles/keycloak/, but only include the namespace. Don't worry about operatorgroups and subscriptions.
  • Add the zookeeper bundle after the other bundles in cluster-scope/overlays/nerc-ocp-obs/kustomization.yaml.

@computate
Copy link
Member

@RH-csaggin For ArgoCD to properly sync namespaces that need to be created first, we add them to a cluster-scope bundle. Let's add to this PR:

* `cluster-scope/base/core/namespaces/zookeeper/` similar to `cluster-scope/base/core/namespaces/keycloak/`.

* `cluster-scope/bundles/zookeeper/` similar to `cluster-scope/bundles/keycloak/`, but only include the namespace. Don't worry about operatorgroups and subscriptions.

* Add the zookeeper bundle after the other bundles in `cluster-scope/overlays/nerc-ocp-obs/kustomization.yaml`.

@RH-csaggin I like your idea about using ArgoCD's CreateNamespace option. Let's try that instead of the bundle:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: zookeeper
spec:
  destination:
    namespace: zookeeper
  syncPolicy:
    syncOptions:
      - CreateNamespace=true

@schwesig schwesig self-requested a review October 2, 2024 10:17
- added back the volumeClaimTemplates and removed pvc to allow scaling.
- prefix to have it more agnostic.
- add namespace to base/zookeeper/kustomization to apply to all the resoruces.
- rectify limits preventing slowing the application.
- set replica to 3 for production ready HA.
@RH-csaggin
Copy link
Contributor Author

RH-csaggin commented Oct 2, 2024

@RH-csaggin For ArgoCD to properly sync namespaces that need to be created first, we add them to a cluster-scope bundle. Let's add to this PR:

* `cluster-scope/base/core/namespaces/zookeeper/` similar to `cluster-scope/base/core/namespaces/keycloak/`.

* `cluster-scope/bundles/zookeeper/` similar to `cluster-scope/bundles/keycloak/`, but only include the namespace. Don't worry about operatorgroups and subscriptions.

* Add the zookeeper bundle after the other bundles in `cluster-scope/overlays/nerc-ocp-obs/kustomization.yaml`.

@RH-csaggin I like your idea about using ArgoCD's CreateNamespace option. Let's try that instead of the bundle:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: zookeeper
spec:
  destination:
    namespace: zookeeper
  syncPolicy:
    syncOptions:
      - CreateNamespace=true

@computate In my testing env using RH GitOps the automated creation of the namespace worked fine with a manifest like this:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: zookeeper
spec:
  destination:
    namespace: zookeeper
    server: https://kubernetes.default.svc
  source:
    path: ai-telemetry/overlays/nerc-ocp-obs
    repoURL: https://github.com/RH-csaggin/nerc-ocp-config.git
    targetRevision: HEAD
    kustomize:
      namespace: zookeeper
  sources: []
  project: default
  syncPolicy:
    automated:
      prune: true
      selfHeal: true
    syncOptions:
      - CreateNamespace=true
    managedNamespaceMetadata:
      labels:
        argocd.argoproj.io/managed-by: openshift-gitops

To allow cluster-resources to be created correctly I had to add the label argocd.argoproj.io/managed-by: openshift-gitops please let me know your thoughts.

Copy link
Contributor

@schwesig schwesig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked together this morning
looking good!

@computate
Copy link
Member

computate commented Oct 2, 2024

@larsks In the comment above #547 (comment), @RH-csaggin discovered a clever way for ArgoCD to automatically create the namespace that we need for this PR to add zookeeper to the obs cluster. do you see any issues with adding these syncOptions to our ArgoCD Application instead of creating a cluster-scope/base/core/namespaces/zookeeper and cluster-scope-bundles/zookeeper?

spec:
  destination:
    namespace: zookeeper
  syncPolicy:
    syncOptions:
      - CreateNamespace=true
    managedNamespaceMetadata:
      labels:
        argocd.argoproj.io/managed-by: openshift-gitops

@jtriley
Copy link
Contributor

jtriley commented Oct 3, 2024

@larsks In the comment above #547 (comment), @RH-csaggin discovered a clever way for ArgoCD to automatically create the namespace that we need for this PR to add zookeeper to the obs cluster. do you see any issues with adding these syncOptions to our ArgoCD Application instead of creating a cluster-scope/base/core/namespaces/zookeeper and cluster-scope-bundles/zookeeper?

This will also need an argocd app defined in the nerc-ocp-apps repo to get this active on the obs cluster. Why not define the namespace in base/zookeeper as you're doing for the other manifests? This would also make it useful outside of argocd (ie manual test deployments) as a standalone set of manifests.

Copy link
Member

@computate computate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rerun the helm chart with replicaCount=3 to fix some StatefulSet configuration for 3 replicas.

@computate
Copy link
Member

@RH-csaggin after a discussion with @larsks , the goal for the nerc-ocp-config repo is to have a yaml resource for everything, including namespaces. So we don't want ArgoCD to automatically create our zookeeper namespace resource, because we should be able to use either ArgoCD, or manually add the namespace from yaml.

So let's go back to the original plan. For ArgoCD to properly sync namespaces that need to be created first, we add them to a cluster-scope bundle. Let's add to this PR:

  • cluster-scope/base/core/namespaces/zookeeper/ similar to cluster-scope/base/core/namespaces/keycloak/.
  • cluster-scope/bundles/zookeeper/ similar to cluster-scope/bundles/keycloak/, but only include the namespace. Don't worry about operatorgroups and subscriptions.
  • Add the zookeeper bundle after the other bundles in cluster-scope/overlays/nerc-ocp-obs/kustomization.yaml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants