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

adding istio sidecar to apicurio instance #259

Open
L040639 opened this issue Jan 29, 2025 · 5 comments
Open

adding istio sidecar to apicurio instance #259

L040639 opened this issue Jan 29, 2025 · 5 comments

Comments

@L040639
Copy link

L040639 commented Jan 29, 2025

@jsenko @EricWittmann

I am trying to add a istio sidecar to the apicurio instance in my redhat openshift cluster but it was not added. Looked into CRD and not finding a way to add the sidecar annotation. Apicurio has this option ??

kind: ApicurioRegistry
apiVersion: registry.apicur.io/v1
metadata:
  name: schema-platform-mesh
  namespace: schema-registry-services
spec:
  configuration:
    persistence: 'sql'
    sql:
      dataSource:
        url: 'jdbc:postgresql://<XXXXXX>-2.rds.amazonaws.com:5432/'
        userName: '<XXXX>'
        password: ${POSTGRES_PASSWORD}
    env:
      - name: POSTGRES_PASSWORD
        valueFrom:
          secretKeyRef:
            name: postgres-password
            key: password
      - name: QUARKUS_LOG_LEVEL
        value: 'debug'
        podTemplateSpecPreview:
  deployment:
    podTemplateSpecPreview:
        metadata:
             annotations:
                    sidecar.istio.io/inject: "true"
@jsenko
Copy link
Member

jsenko commented Jan 29, 2025

hi, try this:

kind: ApicurioRegistry
apiVersion: registry.apicur.io/v1
metadata:
  name: schema-platform-mesh
  namespace: schema-registry-services
spec:
  configuration:
    persistence: 'sql'
    sql:
      dataSource:
        url: 'jdbc:postgresql://<XXXXXX>-2.rds.amazonaws.com:5432/'
        userName: '<XXXX>'
        password: ${POSTGRES_PASSWORD}
    env:
      - name: POSTGRES_PASSWORD
        valueFrom:
          secretKeyRef:
            name: postgres-password
            key: password
      - name: QUARKUS_LOG_LEVEL
        value: 'debug'
        podTemplateSpecPreview:
  deployment:    
    metadata:
      annotations:
        sidecar.istio.io/inject: "true"

The PTS was added later than spec.deployment.metadata. See also https://www.apicur.io/registry/docs/apicurio-registry-operator/1.2.0-dev-v2.6.x/assembly-operator-configuration.html#spec .

@jsenko
Copy link
Member

jsenko commented Jan 29, 2025

Although, I'm not sure how would the injection interact with the operator-managed Deployment. You might need to add the sidecar manually.

@L040639
Copy link
Author

L040639 commented Jan 29, 2025

Hello @jsenko ,above config was deployed, but still the istio sidecar was not added to the pod .

@jsenko
Copy link
Member

jsenko commented Jan 29, 2025

Is the annotation present in the pod? If yes, it's possible that the Istio operator is unable to inject the sidecar into a pod managed by another operator, and you'll have to find an alternative (probably a manual injection with the PTS). We have not tested with Istio, so I'll create an Registry 3 issue to make sure we support this use case. If you're able to make it work, please let us now.

@L040639
Copy link
Author

L040639 commented Jan 29, 2025

The annotation present in the pod but still it was not applied . I will try manual injection .

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

No branches or pull requests

2 participants