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

[1.2.x] Set system namespace with the environment variable "SYSTEM_NAMESPACE" #492

Merged
merged 1 commit into from
Nov 14, 2020

Conversation

renuka-fernando
Copy link
Contributor

Purpose

Set system namespace with the environment variable: SYSTEM_NAMESPACE
Add new package config for global configs

Tests

  • Tested scenario 2 with SYSTEM_NAMESPACE = foo-sys namespace
  • Tested scenario 6 without defining SYSTEM_NAMESPACE variable

Approach

Get SYSTEM_NAMESPACE from environment variable and set it to config.SystemNamespace global variable with enabling to all other packages to access it.

Change SYSTEM_NAMESPACE in operator.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-operator
  namespace: wso2-system
spec:
  replicas: 1
  selector:
    matchLabels:
      name: api-operator
  template:
    metadata:
      labels:
        name: api-operator
    spec:
      serviceAccountName: api-operator
      containers:
        - name: api-operator
          # Replace this with the built image name
          image: wso2/k8s-api-operator:1.2.2
          command:
            - api-operator
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              value: ""
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "api-operator"
            - name: SYSTEM_NAMESPACE
              value: "wso2-system"

Related Issues

#443

@renuka-fernando renuka-fernando changed the base branch from master to 1.2.x November 13, 2020 16:16
@renuka-fernando renuka-fernando changed the title Set system namespace with the environment variable "SYSTEM_NAMESPACE" [1.2.x] Set system namespace with the environment variable "SYSTEM_NAMESPACE" Nov 13, 2020
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.

2 participants