Skip to content

Conversation

@kongdewen
Copy link
Contributor

@kongdewen kongdewen commented Aug 27, 2024

we are currently experience an issue that requires us to expose redis service through nodeport. update the redis service template so it can accept NodePort as service type

test 1:
default service value

  service:
    # service type, default: ClusterIP
    type: "ClusterIP"
    # if service type is ClusterIP, a clusterIP can be specified
    clusterIP:
    # if service type is NodePort, a nodePort can be specified
    nodePort:

service template rendering to the original one

apiVersion: v1
kind: Service
metadata:
  name: airflow-redis
  labels:
    tier: airflow
    component: redis
    release: airflow
    chart: "airflow-1.14.0"
    heritage: Helm
spec:
  type: ClusterIP
  selector:
    tier: airflow
    component: redis
    release: airflow
  ports:
    - name: redis-db
      protocol: TCP
      port: 6379
      targetPort: 6379

test 2:
setup clusterIP:

  service:
    # service type, default: ClusterIP
    type: "ClusterIP"
    # if service type is ClusterIP, a clusterIP can be specified
    clusterIP: 127.0.0.1
    # if service type is NodePort, a nodePort can be specified
    nodePort:
apiVersion: v1
kind: Service
metadata:
  name: airflow-redis
  labels:
    tier: airflow
    component: redis
    release: airflow
    chart: "airflow-1.14.0"
    heritage: Helm
spec:
  type: ClusterIP
  clusterIP: 127.0.0.1
  selector:
    tier: airflow
    component: redis
    release: airflow
  ports:
    - name: redis-db
      protocol: TCP
      port: 6379
      targetPort: 6379

test 3:
setup NodePort

  service:
    # service type, default: ClusterIP
    type: "ClusterIP"
    # if service type is ClusterIP, a clusterIP can be specified
    clusterIP:
    # if service type is NodePort, a nodePort can be specified
    nodePort: 11111
apiVersion: v1
kind: Service
metadata:
  name: airflow-redis
  labels:
    tier: airflow
    component: redis
    release: airflow
    chart: "airflow-1.14.0"
    heritage: Helm
spec:
  type: NodePort
  selector:
    tier: airflow
    component: redis
    release: airflow
  ports:
    - name: redis-db
      protocol: TCP
      port: 6379
      targetPort: 6379
      nodePort: 11111

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@eladkal eladkal requested a review from romsharon98 September 12, 2024 01:48
kongdewen and others added 2 commits September 27, 2024 11:09
Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>
Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>
@romsharon98 romsharon98 merged commit 9b29394 into apache:main Oct 1, 2024
joaopamaral pushed a commit to joaopamaral/airflow that referenced this pull request Oct 21, 2024
* add service type options for redis

* additional value

* update based on testing

* fix syntax

* update description

* Update chart/templates/redis/redis-service.yaml

Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>

* Update chart/templates/redis/redis-service.yaml

Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>

---------

Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>
ellisms pushed a commit to ellisms/airflow that referenced this pull request Nov 13, 2024
* add service type options for redis

* additional value

* update based on testing

* fix syntax

* update description

* Update chart/templates/redis/redis-service.yaml

Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>

* Update chart/templates/redis/redis-service.yaml

Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>

---------

Co-authored-by: rom sharon <33751805+romsharon98@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:helm-chart Airflow Helm Chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants